did you try generating the workbook line by line in sheet js or did you skip to generating excel files with your own code
w
Watz
05/19/2023, 12:27 PM
@battk is that better/faster then using utils.json_to_sheet(tableJson)?
b
borncorp
05/19/2023, 2:19 PM
@battk Yeah, but I couldn't get it to write it line by line, per the documentation for Netsuite it only shows generating the file as a whole, but if you can share code that accomplish this I would be happy to check it out
b
battk
05/19/2023, 7:58 PM
json_to_sheet is what will fail for large files, it requires you to build a large json object, which will increase the chances for memory related errors
or cell by cell using the keys/values on the worksheet object, it basically requires you to understand how the spreadsheet format uses generic objects
battk
05/19/2023, 8:27 PM
i wouldnt really expect either approach to be faster than using N/compress. Libraries like sheet js include javascript code to do the compression and that code just runs badly in suitescript
battk
05/19/2023, 8:29 PM
the primary advantage is that using sheet js should have been easier to write since it already has logic on how to build excel files