Error WorkbookFrozenPane Class Vue.js

Posted by: raphael.silva on 2 September 2020, 9:57 am EST

    • Post Options:
    • Link

    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);

  • Posted 3 September 2020, 1:31 am EST

    Hi,

    We have forwarded this issue to the developers for further investigation with internal tracking id 460689. We will update you once we will hear from them.

    As a workaround, you can also set the columns of frozen pane to 0 to resolve this:

    sheet.frozenPane.rows = 0;
    sheet.frozenPane.columns = 0;
    

    Regards,

    Ashwin

  • Posted 3 September 2020, 9:08 am EST

    ashwin.saxena thanks!

    I tryed set that lines in my code without call WorkbookFrozenPane() but i get the error ```

    Cannot set property ‘rows’ (or columns) of undefined"

  • Posted 4 September 2020, 8:10 am EST

    Hi,

    We need to set the sheet.frozenPane.rows/columns after instantiating WorkbookFrozenPane. Please refer to the following sample and let us know if you face any issues:

    https://stackblitz.com/edit/vue-xdgmwy

  • Posted 8 October 2020, 8:38 am EST

    Hi,

    Regarding #460689, the issue has been fixed in the latest nightly build and will be included in the next release.

    PS: Nightly builds have not passed through the QA cycle and are not suitable for production.

    ~regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels