Bug 50426

Summary: RuntimeException: Unexpected record type (org.apache.poi.hssf.record.GutsRecord)
Product: POI Reporter: apeeters
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal CC: apeeters
Priority: P2    
Version: 3.7-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Bug Depends on:    
Bug Blocks: 52447, 57669    
Attachments: xls file to reproduce exception

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.

Yegor