Hello Karl-Heinz,

thanks for your answer but it's not the Java VM going out of memory, it's
Ecxel upon opening a POI-generated file.

I agree that the file is currupted ;-)

I circumvent the problem now, by checking each String for unicode characters
(high byte != 0), and only use cell.setEncoding(...UTF_16...) if necessary.
Of course, this takes some more computing time, but at least it works...

Creating an excel file with the same content by hand would be quite some
work (problems start at cell 57756), so I don't think I can do that.

As I mentioned before - I tried to write a test case with as close as
possible layout and data but unfortunately this does not trigger the error.

The data that triggers the error contains sensitive customer information, so
I cannot provide the damaged excel file, but it is nothing fancy, just a few
strings and numbers (no formulas or such)...

If I find some more time, maybe I can make a copy of the database and wipe
confidential info...

Regards,
Tobias

> -----Ursprüngliche Nachricht-----
> Von: Karl-Heinz Zengerle [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 4. November 2005 10:29
> An: POI Users List
> Betreff: Re: Excel out of memory when using HSSFCell.ENCODING_UTF_16
> 
> 
> Hi Tobias.
> 
> Does this also occur if you build an Excel file with the same content
> newly from the scratch? Your file seems to be corrupted.
> 
> If you increase Java VM (e.g. -Xmx256m) what's the result then?
> 
> Regards, Karl-Heinz.
> 
> 
> Am Do 03.11.2005 20:08 schrieb Tobias Meyer <[EMAIL PROTECTED]>:
> 
> > Hello list,
> > 
> > I'm using poi-2.5.1-final to generate an excel sheet with 
> 92 columns -
> > text,
> > numbers, booleans and dates.
> > The problem occurs, if I use the UTF_16 encoding (which I need for
> > chinese
> > letters), but not if I use HSSFCell.ENCODING_COMPRESSED_UNICODE.
> > 
> > Excel completely refuses to open the generated file with an error
> > message
> > "not enough memory" (a translation from german, so this propably is
> > not the
> > exact message).
> > OpenOffice can open the file, but has many cells with "*** ERROR IN
> > SST
> > ***", starting in row 628 of approximately 6500, in column 72. (that
> > is cell
> > nr. 57756).
> > 
> > The problem does not occur if there are fewer lines (than 
> ca. 600?? -
> > I have
> > not extensively tested this)
> > 
> > I tried to write a testcase, but unfortunately the problem 
> seems to be
> > a
> > little tricky to trigger.
> > 
> > Has anyone seen similar behaviour before?
> > What can I do to investigate further?
> > 
> > Thanks a lot,
> > Tobias
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> > The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
> > 
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to