On Wed, 2 Jan 2008, Craig Harrison wrote:
The issue I have is that I need the background colour of the HTML table cell to match the background (fill) colour of the spreadsheet cell. When I make the getFillForegroundColor() on the cell style all I get is a short (HSSFColor index). I need to convert the short returned to a value that HTML will understand.

Hmm, looks like those javadocs aren't as helpful as they might be. I've just made the javadocs for the colour related stuff point you at
     org.apache.poi.hssf.usermodel.HSSFPalette#getColor(short)
which ought to give you pretty much what you need (the hex format isn't quite html's, but it's close). New javadocs should be on the site in an hour or so.

Also, you might find it useful to look at testPaletteFromCellColours() in
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java (from a svn checkout) to see how it fits together.

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to