Export datatable as a background process

Export datatable as a background process

MonaHMonaH Posts: 1Questions: 1Answers: 0

Export to excel is working fine but it freezes the UI and if the data >1000 entries it will produce unresponsive script as it takes too long to Export.

Is there a way to achieve Export datatable in background until the download dialogue appears.
I tried web workers but I don't have a good understanding of it and the worker needs the function responsible for export which is an option for buttons in datatable.

I am using the latest DataTables package 1.10.18.
I am new to web development so I appreciate any help.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @MonaH ,

    Sorry, that's not possible. You could try exporting less data, perhaps have some mechanism to only export 500 records at a time, or limit the columns being exported - those may reduced the processing requirement.

    Cheers,

    Colin

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Another option is to give the data to a server to create the file. It would be nice to have this as a background web worker, but as Colin notes, that isn't something we are currently working on.

    Allan

This discussion has been closed.