poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Gardner <chris.r.gard...@gmail.com>
Subject Memory Footprint of Copying Worksheets from 1 WorkBook to Another
Date Thu, 18 Feb 2016 14:57:30 GMT
I'm producing a large xlsx workbook with several worksheets.  The data that
will fill each worksheet comes from different sources (database queries,
web services, etc.).  I suppose that POI won't let you write multiple
worksheets to the same file via multithreading.  Hence, I'd like to create
a single worksheet workbook for each source and, when all individual
workbooks are created, aggregate them into one workbook (each original
workbook in its own worksheet).  I know that I will have to copy each
worksheet, row by row, cell by cell into the aggregated worksheet.

Are there better approaches to doing this?

As I copy each worksheet into the workbook (assuming I'm using SXSSF) could
I run into memory issues as the aggregated workbook grows?  In other words,
even if I'm using SXSSF, when I open the file, is the whole file loaded
into memory even before I start writing additional items to it?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message