Bug 57994 - Error "Unexpected record type" when trying to open formatted XLS file
Summary: Error "Unexpected record type" when trying to open formatted XLS file
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.12-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-03 12:08 UTC by Anton Egorov
Modified: 2015-06-15 14:08 UTC (History)
0 users



Attachments
Problem file (35.50 KB, application/vnd.ms-excel)
2015-06-03 12:08 UTC, Anton Egorov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Egorov 2015-06-03 12:08:14 UTC
Created attachment 32789 [details]
Problem file

Attempt to open the file attached results in the following exception:

java.lang.RuntimeException: Unexpected record type (org.apache.poi.hssf.record.StringRecord)
at org.apache.poi.hssf.record.aggregates.RowRecordsAggregate.<init>(RowRecordsAggregate.java:97)
at org.apache.poi.hssf.model.InternalSheet.<init>(InternalSheet.java:166)
at org.apache.poi.hssf.model.InternalSheet.createSheet(InternalSheet.java:121)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:311)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:264)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:199)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:342)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:323)

Excel opens the file fine. Also, if you open it in Excel and save it without any explicit changes, POI will read it fine too.