NetSuite SheetJS Error #3097
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#3097
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
NetSuite is having troubles with SheetJS. When we save the script file, we get the following error message: Fail to evaluate script: com.netsuite.suitescript.scriptobject.GraalValueAdapter@68d0f09d
When this was raised with Oracle, we were informed that this issue is caused by xlsx being a reserved word in NetSuite SuiteScript hence the error. When in the Script config file we rename xlsx to XLSX or xlsx2 or anything different, the script saves without problems, however the library does not get loaded properly and none of the sheetJS tools work returning TypeError: Cannot read property 'utils' of undefined.
As Oracle is not going to do anything with this, is there an option to change the reference from xlsx to something else on sheetJS end?
The error happens after every maintance of NetSuite or upgrade lasts for months, resolve itself and after the next maintance of NS happens again.
Given the sheer number of NetSuite users that have used the
xlsx
name without issue, this is a bizarre issue.The official NetSuite documentation on reserved words does not mention
xlsx
as a reserved word.SuiteScript
The NetSuite example uses the variable
XLSX
:The standalone scripts also expose a global variable named
XLSX
.It is strongly recommended to use the variable name
XLSX
JSON Configuration
The usage of
xlsx
in the script config is quoted:The AMD export is at the very end of the standalone script. It's easy to change that name, but it will break other loaders including SAP UI5. We'd likely have to introduce a new build.
Next Steps
A new build can be produced, but we need explicit confirmation from Oracle that the name
"xlsx"
is unsupported. Please send this issue link to the Oracle support team and request for one of their engineers to reach out to us.Indeed very bizarre, we have used this without issues as well. only every few months it starts failing and then solves itself again. Oracle's response was never much helpful apart from this side note of reserved words.
I have raised a new issue with them, hoping they will be more clear now and will provide the confirmation in written.
How difficult would it be for us to change the reference in our local sheetJS? We have tried to rename the reference in the config file to:
with the reference being the same in our define:
but that does not seem to work with the library and XLSX variable is blank.
If you would like to edit the script directly: search for
define(
in thexlsx.full.min.js
. There is exactly one instance:Edit
xlsx.full.min.js
and replacedefine("xlsx",
withdefine("sheetjs",
If you would prefer to build the script directly: Follow https://docs.sheetjs.com/docs/miscellany/contributing to build the script.
Edit
bits/99_footer.js
line 6 and change the first argument:that seemed to have worked! thanks for the help. I have left the ticket with Oracle open, in case we get a clarification of the issue from their end.
The workaround has been added to the installation notes and the NetSuite SuiteScript demo.
If Oracle actually responds, please follow up here and we can reopen the issue.