poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rkanigolla <rkanigo...@gmail.com>
Subject POI Upgrade issues.
Date Mon, 07 Nov 2011 23:49:58 GMT
Hi,

I am working for java 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,
Rajesh

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/POI-Upgrade-issues-tp4972849p4972849.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message