Posted 2 September 2020, 9:57 am EST
I am try call function WorkbookFrozenPane Class in Vue.js
but when i save the wokrbook, receive this error:
TypeError: Cannot read property 'toString' of undefined
at Function._xlsx._generateSheetGlobalSetting (es5-esm.js?56ba:14)
at Function._xlsx._generateWorkSheet (es5-esm.js?56ba:14)
at eval (es5-esm.js?56ba:14)
at drain (es5-esm.js?56ba:14)
at Function._SyncPromise.serial (es5-esm.js?56ba:14)
at Function._xlsx._generateWorksheets (es5-esm.js?56ba:14)
at Function._xlsx._saveWorkbookToZip (es5-esm.js?56ba:14)
at Function._xlsx.saveAsync (es5-esm.js?56ba:14)
at eval (es5-esm.js?56ba:14)
at Workbook.cancelAsync (es5-esm.js?56ba:14)
My function that build file excel:
const d = new Date()
var tableCurrencyStyle = new wjcXlsx.WorkbookStyle(),
tableValueStyle = new wjcXlsx.WorkbookStyle()
tableValueStyle.fill = new wjcXlsx.WorkbookFill();
tableValueStyle.fill.color = '#EEEEEE';
tableCurrencyStyle.basedOn = tableValueStyle;
const nomeXLSX = this.reportName
var book = new wjcXlsx.Workbook(), sheet = new wjcXlsx.WorkSheet(), rows = sheet.rows, r = 1
//cabeçalho
rows[0] = new wjcXlsx.WorkbookRow()
sheet.frozenPane = new wjcXlsx.WorkbookFrozenPane()
sheet.frozenPane.rows = 0
...
//Code that set columns and rows ...
...
book.sheets.push(sheet);
sheet.name = nomeXLSX;
book.saveAsync(nomeXLSX);
This error happens when i set this line
sheet.frozenPane = new wjcXlsx.WorkbookFrozenPane()
Debbuging the error happens in book.saveAsync(nomeXLSX);