Summary: | Error reading header signature | ||
---|---|---|---|
Product: | POI | Reporter: | Bob Demers <bobbyjdemers> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.5-FINAL | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
excel file crashing on
Invalid Header Test Case |
Description
Bob Demers
2004-09-20 14:20:25 UTC
Created attachment 12803 [details]
excel file crashing on
What did you use to create this file? I've never seen this occur on a non-corrupt file before. Created attachment 16573 [details]
Invalid Header Test Case
I encountered the same type of problem while using the getBytes() of the HSSFWorkbook. From the Javadoc, Method getBytes - get the bytes of just the HSSF portions of the XLS file. Use this to construct a POI POIFSFileSystem yourself. However, when I feed it to to POIFSFileSystem I get the invalid header error. I've attached a VERY simple test case that create a workbook with a single sheet and it fails when using getBytes() but it will create a readable excel spreadsheet and can be contstructed using the ByteArrayOutputStream.toByeArray () method. The attached file is XML not an XLS BIFF file (not a bug). The below question is an incorrect API usage formed as a bug but its really a question (which should be asked on the list). |