You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Rohit Sharma <rs...@modeln.com> on 2011/05/29 15:47:26 UTC

Reducing memory footprint of XLS file

Hi,

I'm using Apache POI for writing spreadsheets. While the BigGridDemo works
wonderfully well for XLSX files. Is there any way one can reduce the memory
footprint while writing a XLS file?
Currently creating 60K rows with 250 cells, leaves an "out of memory"
exception with the default stack size. I understand that once I increase the
stack size, I can do away with this error. But it would be nice to know if
there exists any method by which we can "stream" the output without keeping
all of it in memory at the same time.

--
Thanks

Re: Reducing memory footprint of XLS file

Posted by Nick Burch <ni...@alfresco.com>.
On Sun, 29 May 2011, Rohit Sharma wrote:
> I'm using Apache POI for writing spreadsheets. While the BigGridDemo 
> works wonderfully well for XLSX files. Is there any way one can reduce 
> the memory footprint while writing a XLS file?

Alas not - there are too many back-and-forth references between bits of 
the .xls file format.

> But it would be nice to know if there exists any method by which we can 
> "stream" the output without keeping all of it in memory at the same 
> time.

Ditch the formatting and use a csv? Or stick with .xlsx!

Nick

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