Bug 43493 - RecordFormatException: On HSSFWorkbookFile Creation
Summary: RecordFormatException: On HSSFWorkbookFile Creation
Status: RESOLVED WONTFIX
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-FINAL
Hardware: Other Windows Server 2003
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-26 10:53 UTC by Scott Rosenbaum
Modified: 2008-01-08 11:04 UTC (History)
0 users



Attachments
Eclipse Project that shows problem behavior. Includes problem Excel File. (837.41 KB, application/zip)
2007-09-26 10:55 UTC, Scott Rosenbaum
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Rosenbaum 2007-09-26 10:53:40 UTC
Using POI-3.0.1-FINAL

I have Excel files that are created by a third party utility (Actuate iServer).
 Most files open as HSSFWorkbook without problem.  Some files are reporting a
RecordFormatException.

If I open the problem files with Microsoft Office Excel 2003, the files open
correctly.  If I save the file (no changes) using same, then they open with
HSSFWorkbook just fine.  

I have attached a small Eclipse project with one Java program that demonstrates
the problem.  Just run the OpenFileError program and you should get the error.

thanks
Comment 1 Scott Rosenbaum 2007-09-26 10:55:18 UTC
Created attachment 20886 [details]
Eclipse Project that shows problem behavior.  Includes problem Excel File.

Eclipse Project that shows problem behavior.  Includes problem Excel File.
Comment 2 Nick Burch 2008-01-08 11:04:39 UTC
That file is really quite messed up :(

It's no good trying to catch the AIOOB exception and skip on, as by then the
whole input stream is messed up, and the next record to try to read some data
blows up with something else. No idea where the original problem is occuring,
only that when we try to read one particular sub-record we're out of data, and
probably should've stopped long long ago

I can't see us being able to handle these files, sorry, they're just too
cryptically broken. Probably your best bet is to script excel to open and
re-save them, as that has a workaround for whatever corruption these files have.