Apache POI Upgrade issue
583867Nov 7 2011 — edited Nov 8 2011Hi,
I am working for an ADF application and here we have used POI 2.5 JAR file for the excel reading.
Now we are upgrading to poi-3.8-beta3 VERSION to handle both xls and xlsx versions. But we are getting the following error when trying to execute the below code snippet.
POIFSFileSystem fileSystem = new POIFSFileSystem(inputStream);
HSSFWorkbook workBook = new HSSFWorkbook(fileSystem);
Error Message:
org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appears to be in the Office 2007+ XML. You are calling the part of POI that deals with OLE2 Office Documents. You need to call a different part of POI to process this data (eg XSSF instead of HSSF)
Is there way to fix this issue without making any code change so that it should support both the excel versions. Please suggest.
Thanks,
Manasa