I've been appending rows to existing XLSX workbooks using java and Apache POI.
The problem is that I keep running out of memory as the workbooks in question grow, and the -Xmx switch only helps to a point.
The actual reading of large workbooks isn't a problem since I can use the SAX event API for that, and writing large amounts of new data isn't a problem since that's handled by SXSSF, but what I'm in need of is some memory effect way of appending rows to already large workbooks.
Using the SXSSFWorkbook(XSSFWorkbook) constructor has been recommended, but as I see it that still means loading the whole (already huge) workbook into memory.
It's also been recommended that one should load the workbook as a File rather than using an input stream to preserve memory, however then I'm assuming I'd have to write everything out to an entirely new file.
So, is there anyone here who knows of a way, using Apache POI, to append rows to already existing (and huge) workbooks without running out of memory?