Search This Blog

Wednesday, January 6, 2010

Excel file using peoplecode

/* Set up the Excel COM objects and open the template file */

Local object &oWorkApp, &oWorkBook;

&oWorkApp = CreateObject("COM", "Excel.Application");

&oWorkApp.DisplayAlerts = "False";

&oWorkBook = ObjectGetProperty(&oWorkApp, "Workbooks");


&oWorkSheet = &oWorkApp.Worksheets("Sheet1");


/* Changing the properties of the cell */

&oWorkSheet.Cells(1, 1).Value = "I'm adding stuff to be bolded";

&oWorkSheet.Cells(1, 1).Font.Bold = True;

/* Save Excel file and quit */



&oWorkApp.DisplayAlerts = "True";


Source: peoplesoft wikidot

No comments:

Post a Comment