|
I'm being asked to add some color to my RPG generated spreadsheets that call the POI Java tools to generate spreadsheets. I know how to specify some colors, using the HSSF tools that Scott Klement wrote, but, those are pre-selected colors and they're pretty horrid for things like creating alternate row colors. I need a much more muted palette.
Does anyone have an example where they have perhaps specified the RGB values of a color. If you do send an example, please also include any special prototypes you had to create to make it happen.
Thank you.
P.S.
Here is an example of what I'm doing now with the preselected colors:
RowColor(2)=COLOR_GREY_25;
RowColor(3)=COLOR_PALE_BLUE;
// Regular number
for idx1=1 to MaxColors;
RegNum(idx1) = SSWorkbook_createCellStyle(book);
SSCellStyle_setFont(RegNum(idx1): RegFont);
SSCellStyle_setAlignment(RegNum(idx1): ALIGN_RIGHT);
callp $SetColor(RegNum(idx1):RowColor(idx1));
endfor;
//**************************************************************
dcl-proc $SetColor;
//**************************************************************
dcl-pi *n;
inStyle like(ssCellStyle);
Index int(5) const;
end-pi;
//************
if Index<>0;
ssCellStyle_setFillForegroundColor(inStyle: Index);
ssCellStyle_setFillPattern(inStyle: SS_PATTERN_SOLID_FOREGROUND);
endif;
return;
end-proc;
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.