https://issues.apache.org/bugzilla/show_bug.cgi?id=54443
Bug ID: 54443
Summary: ClassCastException in HSSFOptimiser
Product: POI
Version: 3.9
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
Exception in thread "main" java.lang.ClassCastException:
org.apache.poi.hssf.record.StyleRecord cannot be cast to
org.apache.poi.hssf.record.ExtendedFormatRecord
at
org.apache.poi.hssf.model.InternalWorkbook.getExFormatAt(InternalWorkbook.java:831)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.getCellStyleAt(HSSFWorkbook.java:1147)
at
org.apache.poi.hssf.usermodel.HSSFOptimiser.optimiseCellStyles(HSSFOptimiser.java:276)
at com.lbs.util.WritableExcelAPI.copyCellStyle(WritableExcelAPI.java:415)
at
com.lbs.util.WritableExcelAPI.setCellFontItalicProp(WritableExcelAPI.java:591)
at com.lbs.util.WritableExcelAPI.main(WritableExcelAPI.java:892)
Here is how i call this method;
if (workBook instanceof HSSFWorkbook&&workBook.getNumCellStyles()>3900){
HSSFOptimiser.optimiseCellStyles((HSSFWorkbook) workBook);
....
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]