Bug 47079 - Cannot open the attached excel file with poi library.
Summary: Cannot open the attached excel file with poi library.
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.2-FINAL
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2009-04-22 09:21 UTC by Min Li
Modified: 2013-08-05 09:35 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Min Li 2009-04-22 09:21:19 UTC
Get the below exception when reading the attached excel.

org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance
at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:186)
at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:328)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:271)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:196)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:178)
Comment 1 Nick Burch 2009-04-22 09:24:27 UTC
Please post the problem file, along with the full stacktrace so we can see which record it's unable to open

Also, please confirm if you've tried with a recent svn checkout / nightly build?
Comment 2 Pankaj Dubey 2010-06-22 06:19:48 UTC
Hi Nick,
Thanks for the prompt response.
Actually, the file was created as XLS with MS Office.
If we open the file with MS Office and then save it as XLSX and then again convert the XLSX file to XLS with open OpenOffice, the POI is having no issues in reading that document(XLS file).
But POI is failing to read the document directly, as mentioned earlier.
I am not able to understand why this is happening, There is no change in the document contents after saving it as XLS with OpenOffice. 

Thanks & Regards,

Pankaj Dubey
Software Engineer
Team Live Documents | InstaColl, Bangalore
Contact: pankaj@instacoll.com | +91-9916129921
Comment 3 Yegor Kozlov 2011-06-24 10:37:51 UTC
Please attach the problematic file. Without it we can't do much to help you.

Comment 4 Dominik Stadler 2013-08-05 09:35:00 UTC
no response in a long time => resolving for now, please reopen with more information ifnthis is still an issue