Bug 55614 - Error "Your InputStream was neither an OLE2 stream, nor an OOXML stream" when trying to open specific file
Summary: Error "Your InputStream was neither an OLE2 stream, nor an OOXML stream" when...
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2013-09-30 21:50 UTC by Keith Hilen
Modified: 2016-06-20 05:38 UTC (History)
0 users

A XLS file that fails on open attempt. (20.82 KB, application/vnd.ms-excel)
2013-09-30 21:50 UTC, Keith Hilen
BaseXLSIteratingTest junit error (908 bytes, text/plain)
2016-06-20 05:38 UTC, Javen O'Neal

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Hilen 2013-09-30 21:50:22 UTC
Created attachment 30896 [details]
A XLS file that fails on open attempt.

We are unable to open XLS files from a particular source - an example is attached. The file will open in Excel. If it is re-saved then it can be opened with POI. We are also able to open and read files from other sources. 

We have confirmed that this problem occurs in Windows, Linux and OSX. 

Error Details:


try {
   InputStream reader = file.createFileStream();
   Workbook workbook = WorkbookFactory.create(reader);
catch (Exception e) {
   reportError("Could not parse Excel file");

Result: IllegalArgumentException
Message: Your InputStream was neither an OLE2 stream, nor an OOXML stream
Comment 1 Keith Hilen 2013-09-30 21:55:32 UTC
I also tried to upload this file to Google Drive - it failed there as well. I was able to upload the file, but attempting to open it results in an error. A file that is opened in Excel and re-saved can be uploaded and successfully opened in Google Drive.
Comment 2 Dominik Stadler 2013-11-22 22:46:36 UTC
BiffViewer also chokes on this file with "Invalid header signature; read 0x0010000000080809, expected 0xE11AB1A1E011CFD0", LibreOffice can read it and also save it in a "fixed" format. 

The Unix "file" command reports this as "Applesoft BASIC program data", it seems Microsoft licensed this at some point, maybe it is some kind of predecessor of Excel 5 files, but I would guess this is out of reach for POI to ever support unless someone with some experience with these steps in...
Comment 3 Javen O'Neal 2016-06-20 05:38:30 UTC
Created attachment 33966 [details]
BaseXLSIteratingTest junit error

Still fails on POI 3.15 beta 2.

Marking as WONTFIX for now. If someone is interesting writing the code to get POI to support this file format, please reopen this bug.