Did anyone manage to get sheetjs to work since the...
# suitescript
t
Did anyone manage to get sheetjs to work since the last guy asked? 🙂 I was trying to follow this page and their github example but for the life of me cannot get it to work. https://nserpsolutions.com/suitescript/scheduled-script/read-create-modify-excel-files-in-suitescript-using-sheetjs/ https://github.com/nserpsolutions/public/blob/main/excel-samples/nse_sd_sc_excel_sample.js Running into: {"type":"error.SuiteScriptModuleLoaderError","name":"xlsx.full.min.js","message":"","stack":[]} Almost certain my path is correct. So odd.
b
modern versions of sheet js have a define statement that looks like
Copy code
define("xlsx",function()
👀 1
amd modules that use the first id parameter must use a require Configuration to create the alias for the id
t
Thanks. Just figured out that the file they have on github has encoding issues. Some of the file looks like giberish. https://github.com/SheetJS/sheetjs/blob/github/dist/xlsx.full.min.js
s
If there is anything that needs to be updated on the github page, please let me know. I know that my code does not work with newer SheetJS libraries but that’s why I included the older SheetJS library in the repo as well
💯 1
p
@Tan Tuohy maybe just use the original xlxs.js? https://github.com/SheetJS/sheetjs/blob/github/xlsx.js