You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by ramprasad <ra...@manthansystems.com> on 2011/04/14 14:40:50 UTC

HSSFWorkbook vs XSSFWorkbook

Hi,

We are using POI3.2, when we upload excel(version msoffice 2007) throwing
version supporting exception. So we have to POI 3.7-20101029 version.
Because of HSSF its still throwing issue like please replace HSSF with XSSF.
So i replaced HSSF with XSSF. After that i'm able to upload excel 2007
version successfully. But when i tried for the older version excel(2003) i'm
unable to upload, itz throwing below error. Problem is i want to upload
excel irrespective of version. Please provide me the solution how to use
what to use.

org.apache.poi.POIXMLException:
org.apache.poi.openxml4j.exceptions.InvalidFormatException: Package should
contain a content type part [M1.13]
	at org.apache.poi.util.PackageHelper.open(PackageHelper.java:41)
	at org.apache.poi.xssf.usermodel.XSSFWorkbook.(XSSFWorkbook.java:186)

-regards
ram

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/HSSFWorkbook-vs-XSSFWorkbook-tp4302900p4302900.html
Sent from the POI - Dev mailing list archive at Nabble.com.

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


Re: HSSFWorkbook vs XSSFWorkbook

Posted by Nick Burch <ni...@alfresco.com>.
On Thu, 14 Apr 2011, ramprasad wrote:
> We are using POI3.2, when we upload excel(version msoffice 2007) throwing
> version supporting exception. So we have to POI 3.7-20101029 version.
> Because of HSSF its still throwing issue like please replace HSSF with XSSF.
> So i replaced HSSF with XSSF.

You want to switch from HSSF to the general org.apache.poi.ss package, see
http://poi.apache.org/spreadsheet/converting.html

Nick

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