You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Rui Wang <Ru...@newcastle.ac.uk> on 2006/01/27 15:33:38 UTC

AWT Color to HSSFColor?

Hi, 

Isn't there a way on converting java awt Color to HSSFColor?

I am using the following: 

Color color = new Color(12, 43, 155);

HSSFColor newColor = workbook.getCustomPalette().addColor((byte)currColor.getRed(), 
					(byte)currColor.getGreen(), 
					(byte)currColor.getBlue());

A java.lang.RuntimeException was thrown while running. 

Anyone knows the proper way of doing this? 


Many thanks
Rui 

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/