You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by to...@tamborine.to, to...@tamborine.to on 2018/09/07 06:00:27 UTC

Create XSSFWorkbook

https://poi.apache.org/components/spreadsheet/converting.html

This document and others gives a snippet: new XSSFWorkbook()

or
workbook = new XSSFWorkbook()

This fails: unable to resolve class XSSFWorkbook 

I've seen other documentation that says to use the WorkbookFactory, my issue is all of those examples have to do with opening a workbook to read it, I'm purely generating a new workbook and can't work out how to do that. I used to successfully (and still can) do this: HSSFWorkbook workbook = new HSSFWorkbook();

Thanks

Tony

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


Re: Create XSSFWorkbook

Posted by Tony Obermeit <to...@tamborine.to>.
Woo hoo!  It was in the ooxml lib directory as you guided.  And I had to
get the commons compression libraries in there.  You've saved me lots of
time.  Now I'm getting a variety of errors where the HSSFSheet has to be
replaced with Sheet, etc. Fonts are same.

From: https://poi.apache.org/components/spreadsheet/converting.html

The new SS usermodel (org.apache.poi.ss.usermodel) is very heavily based on
> the old HSSF usermodel (org.apache.poi.hssf.usermodel). The main difference
> is that the package name and class names have been tweaked to remove HSSF
> from them. Otherwise, the new SS Usermodel interfaces should provide the
> same functionality.
>

Thanks again, you've saved me a lot of time.

On 7 September 2018 at 16:29, Nick Burch <ap...@gagravarr.org> wrote:

> On Fri, 7 Sep 2018, Tony Obermeit wrote:
>
>> Thanks.  Much progress, now it's failing on:
>> org.apache.xmlbeans.XmlException. I think that's part of
>> ooxml-schemas-1.3.jar, trying to find a downloadable jar.
>>
>
> Nope, that's in xmlbeans itself. If you download the binary release of
> Apache POI, it's in the ooxml lib directory. I'd recommend using the latest
> xmlbeans 3.0.1 jar though from https://xmlbeans.apache.org/ as there's a
> few key fixes since 2.6!
>
> Nick
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Re: Create XSSFWorkbook

Posted by Nick Burch <ap...@gagravarr.org>.
On Fri, 7 Sep 2018, Tony Obermeit wrote:
> Thanks.  Much progress, now it's failing on:
> org.apache.xmlbeans.XmlException. I think that's part of
> ooxml-schemas-1.3.jar, trying to find a downloadable jar.

Nope, that's in xmlbeans itself. If you download the binary release of 
Apache POI, it's in the ooxml lib directory. I'd recommend using the 
latest xmlbeans 3.0.1 jar though from https://xmlbeans.apache.org/ as 
there's a few key fixes since 2.6!

Nick

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


Re: Create XSSFWorkbook

Posted by Tony Obermeit <to...@tamborine.to>.
Thanks.  Much progress, now it's failing on:
org.apache.xmlbeans.XmlException. I think that's part of
ooxml-schemas-1.3.jar, trying to find a downloadable jar.

Really appreciate how quickly you replied. Have a super weekend

On 7 September 2018 at 16:08, Nick Burch <ap...@gagravarr.org> wrote:

> On Fri, 7 Sep 2018, tony@tamborine.to wrote:
>
>> This document and others gives a snippet: new XSSFWorkbook()
>>
>> or
>> workbook = new XSSFWorkbook()
>>
>> This fails: unable to resolve class XSSFWorkbook
>>
>
> See http://poi.apache.org/components/index.html#components - XSSF (and
> the other OOXML classes) require additional jars
>
> Nick
>

Re: Create XSSFWorkbook

Posted by Nick Burch <ap...@gagravarr.org>.
On Fri, 7 Sep 2018, tony@tamborine.to wrote:
> This document and others gives a snippet: new XSSFWorkbook()
>
> or
> workbook = new XSSFWorkbook()
>
> This fails: unable to resolve class XSSFWorkbook

See http://poi.apache.org/components/index.html#components - XSSF (and the 
other OOXML classes) require additional jars

Nick

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