I am using the $.ig.GridExcelExporter.exportGrid functionality. More often than not, while the export is occurring I get the browser message that the script is running too long and asks if I want to Wait. This can sometimes occur many times. Eventually the Excel file is created as requested.
This has become annoying to our end users. Is there a way to use exportGrid that prevents this from happening?
Hi Ray,
This is known to occur when exporting large data sets. This can be improved by exporting only the current page of the grid, and excluding exporting the styles. Also, if the grid is filtered, you can opt to export only the filtered records, not all records. You can also define columns that will be skipped while exporting.
Try the example below and if it does not help, please provide more details - the version of Ignite UI for Javascript used, the grid configuration and the number of data records exported.
var exp = new $.ig.GridExcelExporter(); exp.exportGrid($(".selector"), { columnsToSkip: ["column1", "column2", "column3"] gridStyling: none gridFeatureOptions: { paging: "currentPage", filtering: "filteredRowsOnly" } });
In our case we couldn't limit the export to a single page. I did implement the gridStyling and filtering suggestion and that appears to have helped quite a bit.