poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murphy, Mark" <murphym...@metalexmfg.com>
Subject RE: XLS and XLSX with XSSF
Date Wed, 16 Nov 2016 20:57:16 GMT
Yes, but David is correct. Even if you use SS, behind the scenes you are using either HSSF
or XSSF depending on how you created your Worksheet object. And there is no way to switch
the Worksheet object to the other.

-----Original Message-----
From: MARK GOLDEN [mailto:mark_golden@btopenworld.com] 
Sent: Wednesday, November 16, 2016 12:41 PM
To: POI Users List <user@poi.apache.org>
Subject: Re: XLS and XLSX with XSSF

I think HSSF is for XLS, XSSF is for XLSX and you can use SS for either.

    On Wednesday, 16 November 2016, 6:45, David North <dtn-poi@corefiling.co.uk> wrote:

 Hi Markus,

This question would be best asked on the POI user list
(user@poi.apache.org) - moving thread there.

> is there a way to write the same file as xls and xlsx file ?
> For example with XSSF.

The APIs require you to pick one or the other - unfortunately although the two share a set
of common interfaces, we don't have code to clone one implementation into the other.

> I tried writing a xlsx file with HSSF and it works.

That's surprising. Are you sure it's actually written an .xlsx file (a ZIP with XML inside
it)? Or is it the case that Excel happily opens an .xls with the .xlsx extension?

> Can i use XSSF for XLS and XLSX without any problems?
> Thanks a lot.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org For additional 
> commands, e-mail: dev-help@poi.apache.org

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

View raw message