On Wed, 6 Apr 2011, ramullangi wrote:
I am getting the following exception(using Apache POI3.5)Exception in thread "main" java.lang.IllegalArgumentException: Your InputStream was neither an OLE2 stream, nor an OOXML stream at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:65) at PoiExcelRead.main(PoiExcelRead.java:22)
The clue's in the exception message - your file is neither a .xls file nor a .xlsx one. If you open it in a text editor, you'll see that instead it's HTML!
Note: It is working when I open the file using Microsoft Excel and saving it as another file(using File>Save As option from Microsoft Excel Menu)
Excel will happily read a html file and import the contents of a table, while POI only works with the real excel formats
Nick --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
