-
-
Notifications
You must be signed in to change notification settings - Fork 36
newStreamingXlsx
Julian Halliwell edited this page Mar 18, 2021
·
3 revisions
(Version 2+)
Returns a new XML spreadsheet workbook object which uses the memory-efficient SXSSF streaming format while being populated.
newStreamingXlsx( [sheetName [, streamingWindowSize] ] );
-
sheetName
string: name to give the default sheet in the new workbook. -
streamingWindowSize
integer default=100: (positive integer greater than 0) the maximum number of rows that are kept in memory at once while populating the sheet, before being flushed to disk.
SXSSF is memory efficient because rows are transferred from memory to disk once the window size has been exceeded. Rows that have been transferred to disk can no longer be accessed, which means they cannot be changed. Therefore you are likely to get an error if you try to use a method such as setRowHeight()
. If you need to change rows that have already been added to a workbook, use the XLSX format instead.
spreadsheet = New spreadsheet();
workbook = spreadsheet.newStreamingXlsx( streamingWindowSize=10 );