|
Hello K,
This would be RPG code that you'd put in your own program/library.
You mention "LIBHTTP" which is a library name I typically use for
HTTPAPI -- which is completely unrelated to POI/XSSF. So I'm not sure
where that came from?
But, I would not insert it into any 3rd party tool like POI/HSSF/XSSF or
HTTPAPI, because then when you update those packages, you'll lose that
code. Instead, put it into your own library (-ies) where it's kept with
all of your other code that you write for your company.
Does that make sense?
On 6/23/22 11:07 AM, K Crawford wrote:
I found this thread from March of 2019 by Darrren S.to
I would like to use this but am a bit confused. I am confused on where
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);
Scott Klement
http://www.scottklement.com
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
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.