Summary: | problem setting cell type through HSSF | ||
---|---|---|---|
Product: | POI | Reporter: | Dan Podsedly <dpodsedly> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | major | ||
Priority: | P3 | ||
Version: | 1.5 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | other | ||
Attachments: | excel spreadsheet |
Description
Dan Podsedly
2002-07-23 18:20:29 UTC
please attach your worksheet. It would also be helpful to see some sample of the code you used to create it. Lastly, you're using 1.5 and not 1.5.1? Please confirm this is a problem in 1.5.1. -Andy Created attachment 2462 [details]
excel spreadsheet
Everything in this Workbook is a LabelSST record. Can you give us a copy of the source you generated this with? Generally when this happens we've got an invalid palette index. -Andy Unfortunately I can't really give you the code that generated this - it's part of a rather complicated framework. How do you usually end up with an invalid palette index? We are using HSSFColorConstants to set cell colors. upgrade to HSSF 1.5 and use HSSFColor instead. Some of these were corrected in 1.5 (this is a bug that has been fixed). We are already using 1.5. There doesn't seem to be a way to use HSSFColor (even in 1.5.1) to set cell colors. The comment in the HSSFColor class states that the class "intends to provide support for the very evil index to triplet issue and will likely replace the color constants interface for HSSF 2.0". So, how do we use HSSFColor instead of the HSSFColorConstants? Sorry I mistyped I meant upgrade to 1.5.1. As for how to use HSSFColor, please read this http://jakarta.apache.org/poi/hssf/quick-guide.html You are correct that the comment in HSSFColor is not nice. I believe it was just not changed when we decided to do a 1.5 release. |