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
{{ message }}
This repository has been archived by the owner on Apr 18, 2020. It is now read-only.
Hi, I'm using TableToExcel to download a table that can be sometimes pretty big, and it takes up to 10-15 seconds for the download to start. I've been tasked with showing some visual cue that the download is preparing. I'm using jQuery.
I've tried to change the style/color of the download icon right before calling TableToExcel, but it seems this change doesn't have time to be reflected on the page before TableToExcel starts processing, because the color changes once the download has finished.
Any idea how I can achieve that?
The only thing working is to display an alert, but ... that's not a great solution.
Thanks
Damien
The text was updated successfully, but these errors were encountered:
@damien7792 first of all, it is not a good idea to use TableToExcel for exporting large amount of data. TableToExcel is developed as a workaround to temporarily replace a legacy way of exporting HTML to excel file (till we gradually migrate everything to server side).
TableToExcel is iterating through each td and creating the corresponding cells in excel, so this is a blocking process. The browser will not be able to do anything else(including repainting the DOM) at this time. So it is not advisable to use this to export large amount of data, since it causes an unpleasant user experience.
However, if you want to go forward with this approach, you could try deferring the conversion.
$('#exportBtn').loading();// to display the loadersetTimeout(function(){TableToExcel.convert(document.getElementById("table1"));},0);$('#exportBtn').resetLoading();
Hi, I'm using TableToExcel to download a table that can be sometimes pretty big, and it takes up to 10-15 seconds for the download to start. I've been tasked with showing some visual cue that the download is preparing. I'm using jQuery.
I've tried to change the style/color of the download icon right before calling TableToExcel, but it seems this change doesn't have time to be reflected on the page before TableToExcel starts processing, because the color changes once the download has finished.
Any idea how I can achieve that?
The only thing working is to display an alert, but ... that's not a great solution.
Thanks
Damien
The text was updated successfully, but these errors were encountered: