I am trying to read data from excel file but it is giving me the following error:
Exception in
thread "main" org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appears to be in the Office 2007+ XML. POI only supports OLE2 Office documents
at org.apache.poi.poifs.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:108)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:151)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:312)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:293)
at Test.displayFromExcel(Test.java:46)
at Test.main(Test.java:28)
I am using Apache HSSF-POI version 3.2-FINAL-20081019.
My file has .xls extension.
Any idea what's wrong?