My Oracle Support Banner

E-PC:Modifying The Cell Width Using The SetColumnWidth Method In Peoplecode Is Not Working (Doc ID 3019402.1)

Last updated on MAY 02, 2024

Applies to:

PeopleSoft Enterprise PT PeopleTools - Version 8.60 and later
Information in this document applies to any platform.

Symptoms

Following peoplecode doesn't set the cell width:

Global object &ss;
Global string &outFileName;
/* Get Process Instance Directory */
SQLExec("SELECT PRCSOUTPUTDIR FROM PS_CDM_LIST WHERE PRCSINSTANCE =
:1", ZHRW_EMP_AET.PROCESS_INSTANCE, &path);
/* Get Directory Separator */
&dirSep = "/";
If Substring(GetEnv("PS_SERVDIR"), 1, 1) <> "/" Then
&dirSep = "\";
End-If;
/* Set Output File Name */
&outFileName = "Employee_Certs.xlsx";
MessageBox(0, "", 0, 0, " output file = " | &path | "-" | &dirSep | "-" |
&outFileName);
/* Create Spreadsheet using PSSpreadsheet class */
&ss = CreateObject("PSSpreadsheet");
&ss.Open(&path | &dirSep | &outFileName, True);
&sheetnum = 0;
&sheetname1 = "Instructions";
&ss.SetActiveSheetName(&sheetname1);
&ss.SetSheetActivate(&sheetnum);
&rownum = 1;
&colnum = 1;
&data = "Report Name";
&ss.SetColumnWidth(1, 50);
&ss.SetCellString(&rownum, &colnum, &data);
&red = 100;
&green = 100;
&blue = 100;
&boldweight = 700;
&color = 100;
&fontheight = 8;
rem &fontname = "Aharoni";
&fontname = "Amasis MT Pro Black";
&ss.SetCellHeaderStyle(&rownum, &colnum, &red, &green, &blue, &boldweight,
&color, &fontheight, &fontname);
&rownum = 1;
&colnum = 2;
&data2 = "License, Certificate, Training";
&width = 200;
&ss.SetColumnWidth(&colnum, &width);
&ss.SetCellString(&rownum, &colnum, &data2);
&rownum = 2;
&colnum = 1;
&data3 = "Description";
&ss.SetCellString(&rownum, &colnum, &data3);
&red = 100;
&green = 100;
&blue = 100;
&boldweight = 10;
&color = 100;
&fontheight = 8;
rem &fontname = "Aharoni";
&fontname = "Amasis MT Pro Black";
&ss.SetCellHeaderStyle(&rownum, &colnum, &red, &green, &blue, &boldweight,
&color, &fontheight, &fontname);
&rownum = 2;
&colnum = 2;
&data4 = "List of employee licenses, certifications and training from the Talent
Profile component. The report is a union of 3 sets:" | Char(10) | "a. Employee rows
on content types that are defined on the employee's jobcode in Profile Management.
The jobcode mapping is a non-Person profile type (JOB-TRN-MCWN), and this set will
contain all employees of the jobcode, whether or not they have taken the content
items that are defined for their jobcode.";
&data5 = &data4 | Char(10) | "b. Employee licenses, certificates and Meskanas
training that are not mapped on the non-Person profile (JOB-TRN-MCWN).";
&data6 = &data5 | Char(10) | "c. Meskanas training courses that are marked as
Required for all employees. Like the first set, this will contain all employees
whether or not they have taken the mandatory course.";
&ss.SetCellString(&rownum, &colnum, &data6);
&sheetnum = 1;
&sheetname2 = "Job Related Training";
&ss.CreateSheet(&sheetname2);
&ss.SetActiveSheetName(&sheetname2);
&ss.SetSheetActivate(&sheetnum);
&ss.SetCellString(1, 1, "Report Name");
&ss.SetCellString(1, 5, "Job Related Training");
&red = 100;
&green = 100;
&blue = 100;
&boldweight = 700;
&color = 100;
&fontheight = 8;
rem &fontname = "Aharoni";
&fontname = "Amasis MT Pro Black";
&ss.SetCellHeaderStyle(1, 5, 255, 0, 255, 20, 50, 12, "Calibri");
&ss.SetCellString(2, 1, "Row Access");
&oprid = ZHRW_EMP_AET.OPRID;
&ss.SetCellString(2, 2, &oprid);
&ss.SetCellString(2, 5, "Run Controls:");
rem &ss.SetCellHeaderStyle(2, 5, &red, &green, &blue, &boldweight, &color,
&fontheight, &fontname);
&ss.SetCellHeaderStyle(2, 5, 255, 0, 255, 20, 50, 12, "Calibri");
&ss.save()

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.