× 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'm not sure I fully understand what you're saying, but I think you're implying that I would go to every Excel client install that might receive this, and change their default settings. That's not an option for me inside my company, and even more impossible for external customers.


-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Booth Martin
Sent: Wednesday, March 20, 2019 4:47 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Custom colors in Excel with POI XSSF

Would it be easier to create your own named theme(s), and fuss with these kinds settings once, in Excel's settings, where there is a pretty good color picker?


On 3/20/2019 2:57 PM, Darren Strong wrote:
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;


--
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@xxxxxxxxxxxx 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 thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.