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: Code: try { InputStream reader = file.createFileStream(); Workbook workbook = WorkbookFactory.create(reader); processWorkbook(workbook); file.close(); } catch (Exception e) { reportError("Could not parse Excel file"); } Result: IllegalArgumentException Message: Your InputStream was neither an OLE2 stream, nor an OOXML stream
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.
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...
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.