Join Slack
Powered by
Did anyone manage to get sheetjs to work since the...
# suitescript
t
Tan Tuohy
08/21/2023, 5:06 AM
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
battk
08/21/2023, 5:08 AM
modern versions of sheet js have a define statement that looks like
Copy code
define("xlsx",function()
👀 1
battk
08/21/2023, 5:09 AM
amd modules that use the first id parameter must use a
require Configuration
to create the alias for the id
t
Tan Tuohy
08/21/2023, 5:31 AM
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
Selcuk Dogru
08/21/2023, 6:58 AM
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
Philip Denys
08/25/2023, 7:25 AM
@Tan Tuohy
maybe just use the original xlxs.js?
https://github.com/SheetJS/sheetjs/blob/github/xlsx.js
14
Views
Open in Slack
Previous
Next