Bug 50426 - RuntimeException: Unexpected record type (org.apache.poi.hssf.record.GutsRecord)
Summary: RuntimeException: Unexpected record type (org.apache.poi.hssf.record.GutsRecord)
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.7-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Blocks: 52447 57669
  Show dependency tree
Reported: 2010-12-07 10:06 UTC by apeeters
Modified: 2015-05-01 20:49 UTC (History)
1 user (show)

xls file to reproduce exception (18.47 KB, application/octet-stream)
2010-12-07 10:08 UTC, apeeters

Note You need to log in before you can comment on or make changes to this bug.
Description apeeters 2010-12-07 10:06:59 UTC
The document in attachment generates a RuntimeException: Unexpected record type (org.apache.poi.hssf.record.GutsRecord) when opened using Apache POI 3.7.

java.lang.RuntimeException: Unexpected record type (org.apache.poi.hssf.record.GutsRecord)
	at org.apache.poi.hssf.record.aggregates.RowRecordsAggregate.<init>(RowRecordsAggregate.java:103)
	at org.apache.poi.hssf.model.InternalSheet.<init>(InternalSheet.java:207)
	at org.apache.poi.hssf.model.InternalSheet.createSheet(InternalSheet.java:162)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:274)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:188)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:305)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:286)
	at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:60)

Excel opens the file without problems.
Comment 1 apeeters 2010-12-07 10:08:19 UTC
Created attachment 26378 [details]
xls file to reproduce exception
Comment 2 Nick Burch 2010-12-07 19:31:22 UTC
Do you know how the file was produced? Did it come from Excel or some other program?

If you load the file in excel, do save as to create a new file, does POI hit the same problem on the new file or does it go away?
Comment 3 apeeters 2010-12-08 03:56:44 UTC
The file comes from an external program. Opening and saving using Excel solves the problem.

I can also open the file without any problems in OpenOffice and Apple Numbers. The latter gives me a warning about frozen panes and split windows and the second tab is empty.
Comment 4 Yegor Kozlov 2010-12-11 08:48:31 UTC
Fixed in r1044655, junit added.