https://issues.apache.org/bugzilla/show_bug.cgi?id=55505
Bug ID: 55505
Summary: CountryRecord not found
Product: POI
Version: 3.10-dev
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
Assignee: [email protected]
Reporter: [email protected]
Created attachment 30785
--> https://issues.apache.org/bugzilla/attachment.cgi?id=30785&action=edit
Excel file to reproduce issue
Attached is an xls file that was produced via Crystal Reports. Opening the file
and trying to add a sheet leads to the following exception:
Exception in thread "main" java.lang.RuntimeException: CountryRecord not found
at org.apache.poi.hssf.model.LinkTable.<init>(LinkTable.java:265)
at
org.apache.poi.hssf.model.InternalWorkbook.getOrCreateLinkTable(InternalWorkbook.java:1794)
at
org.apache.poi.hssf.model.InternalWorkbook.checkSheets(InternalWorkbook.java:741)
at
org.apache.poi.hssf.model.InternalWorkbook.setSheetName(InternalWorkbook.java:585)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.createSheet(HSSFWorkbook.java:789)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.createSheet(HSSFWorkbook.java:73)
The code to reproduce this is:
Workbook wb = WorkbookFactory.create(new File("ReportB.xls"));
wb.createSheet("test");
Opening the file in Excel and saving it again produces a file that can be read
and modified without any problems. I guess Excel simply assumes a default
CountryRecord in this case. If this is the case, it would probably make sense
to assume a default CountryRecord as well rather than throwing an exception.
--
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]