Hello,

2007/3/10, Karr, David <[EMAIL PROTECTED]>:
I'm reading a spreadsheet, and I have a cell and it's cellstyle, so I
can get the fillbg index.  How do I tell what color that is?

Are you trying to obtain the related HSSFColor or the triplet rgb for
that color?

I can't
even figure it out by looking at the "Constant Field Values" link in the
javadoc.  A cell that appears to be white shows a value of 65, and a
cell that appears to be grey shows a value of 64. I don't even see those
values as values of the "index" field in the constants page.

I haven't tried it but I think you may want to try something like:

HSSFPalette pal = wb.getCustomPalette();
HSSFColor c = pal.getColor(index);
short[] triplet = c.getTriplet();

Regards,

Òscar

Reply via email to