You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the ExcelJS library in Netsuite but facing a lot of issues with the setup. I downloaded the exceljs.min.js cdn Cloudflare and attached the file as a 3rd party module in Netsuite SuiteScript File.
In the initial testing module steps, I executed the below code and found the execution occurred successfully
let workbook = new ExcelJS.Workbook();`
log.debug('workbook', workbook);
workbook.creator = 'Ng Wai Foong';
workbook.lastModifiedBy = 'Bot';
workbook.created = new Date(2021, 8, 30);
workbook.modified = new Date();
workbook.lastPrinted = new Date(2021, 7, 27);
log.debug('workbook', workbook);
After that, I added the addWorkSheet code let worksheet = workbook.addWorksheet('New Sheet'); and got the strange and weird error below:
TypeError: Converting circular structure to JSON exceljs
Also, when executing the below code, I am getting the above-mentioned error
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi Devs,
I am trying to use the ExcelJS library in Netsuite but facing a lot of issues with the setup. I downloaded the exceljs.min.js cdn Cloudflare and attached the file as a 3rd party module in Netsuite SuiteScript File.
In the initial testing module steps, I executed the below code and found the execution occurred successfully
After that, I added the addWorkSheet code
let worksheet = workbook.addWorksheet('New Sheet');
and got the strange and weird error below:TypeError: Converting circular structure to JSON exceljs
Also, when executing the below code, I am getting the above-mentioned error
await workbook.xlsx.load(salesReportTemplateFile.getContents())
It seems like, there's some issue with the setup. I will be really thankful to you for helping here by resolving the issues in the initial setup.
Beta Was this translation helpful? Give feedback.
All reactions