Hi All, Questions about producing large .xlsx spreadsheets and the BigGridDemo example are frequent on the POI mailing lists. While BigGridDemo is good for demonstration purposes, I was never comfortable to recommend it to end users because it requires some knowledge of SpreadsheetML, it is easy to generate malformed XML, etc.
Alex Geller in https://issues.apache.org/bugzilla/show_bug.cgi?id=51160 provided an excellent contribution of the SXSSF API built on top of XSSF. SXSSF (package: org.apache.poi.xssf.streaming) is an API-compatible streaming extension of XSSF to be used when very large spreadsheets have to be produced, and heap space is limited. SXSSF achieves its low memory footprint by limiting access to the rows that are within a sliding window, while XSSF gives access to all rows in the document. Older rows that are no longer in the window become inaccessible, as they are written to the disk. API-compatible here means that you can use most of features from the Spreadsheet Usermodel API without any knowledge of SpreadsheetML! All you need to do is to construct a SXSSFWorkbook instead of XSSFWorkbook. The rest is hidden in the implementation. Finally, this code is documented and users are advised to use SXSSF instead of BigGridDemo. Please re-read the updated documentation: http://poi.apache.org/spreadsheet/index.html http://poi.apache.org/spreadsheet/how-to.html#sxssf I also added SXSSF to the list of components in Bugzilla. Yegor --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org