×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I found this thread from March of 2019 by Darrren S.
I would like to use this but am a bit confused. I am confused on where to
put this code. Do I put it in one of the members in the LIBHTTP library?
Or in one of the POI36 members? Or in my program that is building the
XLSX? Or create something new?
This is the code he posted.
dcl-c XSSFColor_CLASS
'org.apache.poi.xssf.usermodel.XSSFColor';
dcl-c Color_CLASS
'java.awt.Color';
DCL-PR new_XSSFColor
OBJECT(*JAVA: XSSFColor_CLASS)
EXTPROC(*JAVA : XSSFColor_CLASS
: *CONSTRUCTOR );
Color OBJECT(*JAVA : Color_CLASS);
END-PR ;
dcl-pr New_Color
object(*JAVA:Color_CLASS)
extproc(*JAVA:Color_CLASS
:*CONSTRUCTOR);
red like(jint) value;
green like(jint) value;
blue like(jint) value;
end-pr;
dcl-pr XSSF_setFillForegroundColor
extproc(*JAVA
: 'org.apache.poi.xssf.usermodel.XSSFCellStyle'
: 'setFillForegroundColor');
XSSFColor object(*JAVA: XSSFColor_CLASS);
end-pr;
dcl-s ClrObj object(*JAVA:Color_CLASS);
dcl-s XSSFColor OBJECT(*JAVA: XSSFColor_CLASS);
_________________________
Example call:
ClrObj=New_Color(200:200:200);
XSSFColor=New_XSSFColor(ClrObj);
// Create a cell style for wrapped column headings.
// These are bold and have a border line at the bottom
ColWrapped = SSWorkbook_createCellStyle(book);
ssCellStyle_setFont(ColWrapped: WhiteFont);
SSCellStyle_setWrapText(ColWrapped:*On);
SSCellStyle_setAlignment(ColWrapped: ALIGN_CENTER);
XSSF_setFillForegroundColor(ColWrapped:XSSFColor);
ssCellStyle_setFillPattern(ColWrapped: SS_PATTERN_SOLID_FOREGROUND);
callp $SetAllBorder(ColWrapped:BORDER_THIN);
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.