It is possible, correctly I don't know, to get a 64 from the cell.getCellStyle().getFillForegroundColor() From looking at the code inside of the getColor() method it looks like 64 - 8=56 is 1 out of range for palette entries. Yet I am getting a 64 from the getFillForegroundColor() method. I'm guessing that the problem is with whoever is calling the org.apache.poi.hssf.record.ExtendedFormatRecord.setFillForeground() or in the org.apache.poi.hssf.record.ExtendedFormatRecord.fillFields(). It looks like getFillForegroundColor() is returning a 1-based index and getColor() is asking for a 0-based index. But don't take my word on it.
Created attachment 6011 [details] Excel file that caused me problems. (Any would probably work)
this sounds serious
I thought so too, but I would think that someone would have found this problem long ago. I'm might be missusing these methods...
Once again, I dont understand this bug. In the absence of a compilable testcase, it will have to wait for someone else.
64 is used for the default/automatic/no fill colour. This is handled now in the HSSFPallette class and the HSSFColor.AUTOMATIC class. Jason