Page hangs when exporting large data to excel

Posted by: stone.gislason on 9 January 2019, 3:57 am EST

    • Post Options:
    • Link

    Posted 9 January 2019, 3:57 am EST

    If there is too much data in the grid, web browser will pop-up with a “Script is taking too long” warning message, even when using FlexGridXlsxConverter.saveAsync(…);

    Is this a known issue or is there a work-around for this.

    Using Angular 4.

  • Posted 9 January 2019, 4:22 am EST

    more exactly

    const wb = FlexGridXlsxConverter.saveAsync(…);



    wb.saveAsync(fileName, …)

  • Posted 9 January 2019, 5:46 pm EST

    Hi,

    This is expected in case of large data set due to the heavy processing required for conversion.

    saveAsync() method doesn’t do all the work asynchronously, what it handles is basically saving the workbook to file, but the conversion of the grid to workbook is still the same in both the methods. Since the conversion of the grid to workbook needs access to DOM, it cannot be processed in a separate thread than UI.

    Hope this clears. Please let us know if you still have some confusions regarding the two.

    ~Sharad

  • Posted 26 July 2019, 5:15 am EST

    any solution yet on this issue, or it will persist with large data set when exported using FlexGridXlsxConverter.

    Any way we can switch the processing thread other than current UI.

    Thanks,

  • Posted 28 July 2019, 10:13 pm EST

    Hi Arjun,

    We are sorry but the conversion of the grid to workbook requires access to DOM so we cannot switch to any thread other than UI.

    Regards,

    Ashwin

  • Posted 10 April 2024, 4:21 pm EST

    Can we create web worker for it? if yes provide sample.

    Thanks

  • Posted 10 April 2024, 8:41 pm EST

    Hi Gray,

    Currently, Excel export using web workers is not supported because the conversion of the grid to a workbook requires access to the DOM, as mentioned previously. However, our team has already considered this as an enhancement, and it is on our to-do list with an internal tracking ID WJM-25460.

    In the meantime, you can use the saveAsync function of FlexGridXlsxConverter to export Excel asynchronously by generating the workbook asynchronously. You can also consider using a progress bar to show the export progress. Please refer to the API and sample link below for reference:

    https://developer.mescius.com/wijmo/api/classes/Wijmo_Grid_Xlsx.Flexgridxlsxconverter.html#saveasync

    Sample link: https://stackblitz.com/edit/wijmo-purejs-flexgridxlsxconverter-hxqrzf?file=index.js

    Regards

Need extra support?

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

Learn More

Forum Channels