poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rc...@ebi.ac.uk
Subject Re: HSSFRichTextString.applyFont causing MS Excel to run out of memory
Date Tue, 19 Jun 2007 21:37:58 GMT

On Tue, June 19, 2007 8:41 pm, Henry Martin wrote:
>> The problem comes with this last bit of code, when I call
>> hssfTextString.applyFont(). I tried a small test set of data (5 rows,
>> each cell having two or three data items to be processed). It worked
>> perfectly. I then tried it with a production test set (3500 rows, each
>> cell having 4-5 data items). That's when I found that MS Excel could
>> no longer open the document
> Can you partition the production test set to find out if it is a
> specific row causing the problem ( either by controlling the source of
> data or by counting rows in your code  )?  A particularly simple test
> might be to use only the first 5 rows from the production test set.

I can, but I have the feeling that's not the issue. I'm thinking object
creation is the problem. I've tried googling the problem and from what I
could find that was reasonably close, it seems that every time you create
an HSSFRichTextString and modify it in some way by applying styles and
fonts, it seems that a new object is created in a shared string area. This
means that if I modify a given cell content a few times with various
substrings, it's creating a whole lot of orphaned SSTs that, to the best
of my knowledge, are not cleaned up. This is purely a wag on my part, but
if that's the problem, I don't know how to get around it.

Anyway, I can try it and post the original xls file (without colors), the
production file (broken, with colors) and a version that has been saved by
OpenOffice on my work website tomorrow if anybody wants to have a better

I appreciate any pointer or comment :)

Richard Cote
Software Engineer - PRIDE Project Team (Sequence Database Group)

European Bioinformatics Institute
Wellcome Trust Genome Campus            RCote@ebi.ac.uk
Cambridge CB10 1SD                      Phone: (+44) 1223 492610
United Kingdom                          Fax  : (+44) 1223 494468

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

View raw message