Search code examples
javaxlsapache-poipoi-hssfhssf

How to store directly data in Apache POI XLS?


I use Apache POI HSSF API for Java to generate a long long report as XLS file. The problems is date is really large and my memory fails before calling wb.write(out);. So I wonder if there is some way directly or periodically to store the information for the XLS report.


Solution

  • You could try using the latest version of POI 3.8 beta and look into the SXSSF model, I'm know they are trying to help memory usage when reading in from an xlsx, but I'm not sure how it would work with writing out. Might be worth a look though.

    Other than that I think you're only option is to up the heap space for your JVM by using -Xmx.

    I hope this helps!