I imported sheetJS like I would any other module a...
# suitescript
r
I imported sheetJS like I would any other module and it's showing undefined.
a
what do you mean by "it's showing undefined" where is it showing that?
r
Cannot find property utils of undefined
Untitled.js
This is summary stage of an MR.
a
huh ok, that is weird. You're not using sheetJS until the summary? and the file is in the libraries folder, not in /libraries/SheetJS/ ?
r
It's in the same folder as the other library i'm using in this script
a
figured, just ruling stuff out
r
It's my first time using sheetJS. I followed the NS instructions and landed here: https://cdn.sheetjs.com/xlsx-0.20.0/package/dist/xlsx.full.min.js
a
sorry, you want someone more familiar with the specifics of sheetJS, but my gut instinct is that .min file is for browser usage and it wont work serverside / in an MR script.
r
It says the script I linked is verified for MR. https://docs.sheetjs.com/docs/demos/cloud/netsuite/
a
I don't feel like this section is very clear.
oh maybe that stuff is just optional... hmm I know it shouldn't matter but try changing the alias to XLSX like they use in all their docs
r
a
aight.. gimme a few minutes, I've not used it but one of my colleagues has, let me take a look at his code and figure out how he got it working (he's on PTO today)
thankyou 1
r
you might try doing a diff with the source code. in at least one article they mention hacking on the source code... ... ... 😕
tried this, but it's not recognizing my config i don't think. i don't typically use an amdconfig either. https://github.com/nserpsolutions/public/tree/main/excel-samples
👍 1
a
yeah code is looking wildly different, maybe he had to get an old version of it... or he's tried with the mini instead of full... and then switched back but used the mini file name that still existed lol yeah need to do some more diffs 😂
ugh... i know why this code looks so different, we bought the paid version
r
so that link i shared... it works. not sure why it's not working in my MR.
i have a working scheduled script that produces a spreadsheet
a
which link?
so I doubt its actually an issue, but why does your other lib have spaces in the file name? don't have spaces in files names, why would you do that?
r
i do that all the time
a
🤮
r
it's perfectly allowed...
a
not by ME it isn't 😂
so you got it working with the NAmdConfig and the JSONconfig path file stuff?
r
yep, just trying to apply that to my MR
also had to include jszip
👍 1
resolved. god that was a headache
a
hey man that's good work for a Friday... you earned your weekend 👍
true news 1