Currently I am working on a project that requires me to read several Excel Workbooks and I am using the HSSFWorkbook class to do just that. I have a total of 4 work books that need uploading and I have manged to get 3 of the 4 to upload with no problems. Yet the 4th and weirdly enough the most simple/straight forward of the Workbooks is throwing an error when HSSFWorkbook is trying to read it...
java.io.IOException: Unable to read entire header; -1 bytes read; expected 512 bytes
at org.apache.poi.poifs.storage.HeaderBlockReader.<in it>(HeaderBlockReader.java:78)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.<i nit>(POIFSFileSystem.java:83)
The workbook it's self does not have any special formating, has no macros and only consists of the first worksheet. :confused:
If any one has any insight into this I would greatly appreciate the help. Thank you.
A little more
Just thought I would elaborate a little more on this. The data that is in the Workbook in question is just String and integer data, that make up dates, locations, dollar amounts. Such as this....
(empty) | Us Local | Some Random Country | etc. |
1/1/09 | $123 | $90 | $10 |
2/1/09 | $125 | $95 | $150 |
I hope that helps.
I have problem read the excel file by hssf which has 30000 rows in it