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
I am using Apache HSSF-POI version 3.2-FINAL-20081019.
My file has .xls extension.
Any idea what's wrong?
POI apparently suspects that it is not an XLS file, but an XLSX file - is it? If so, you need to use the POI 3.5 beta version (which supports Office Open XML - something POI 3.2 does not do).
Joined: Jul 27, 2009
Thank you for your reply. Actually i wasn't using a correct file type. I was appending .xls extension to an Open Office org file preveously so only it was giving that error.
I tried with a MS-Excel (2003) file then it's working fine.