You can insert large amounts of data using the setArray method instead of the setValue method in order to achieve optimized performance. The setArray method sets the values in the specified two-dimensional array of objects into the specific range of cells of the worksheet.
When you're dealing with spreadsheets having bulk data, using the setArray method improves the overall performance of the spreadsheet (as compared to the setValue method), both in terms of memory footprint and efficiency.
Refer to the following code snippet in order to set large amounts of data using the setArray method.
JavaScript |
Copy Code
|
---|---|
var spread = new GC.Spread.Sheets.Workbook(document.getElementById('ss'), { sheetCount: 1 }); // Setting array of values ]; // Setting array of formulas |