Hello Hicham, The exception that Patrick received was: java.lang.IllegalArgumentException: Your InputStream was neither an OLE2 stream, nor an OOXML stream at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:64)
...which signifies that the stream is not 'OpenDocument format' (starting with 50 4B 03 04) nor a 'Microsoft Compound Document'/'OLE' file (starting with D0 CF 11 E0 A1 B1 1A E1). As Nick mentioned above, having an extension ".xls" and being readable by Excel does not guarantee that a file is either of these two formats. For example, the file may be plain text, html, csv, or even a prior BIFF (<8) version. POI reads two spreadsheet formats: BIFF8 - within a 'Microsoft Compound Document' OOXML - within an 'OpenDocument' If you are sure that the offending document really *is* of one of these two formats, please upload it to help troubleshoot this issue further. regards, Josh
