This is a migrated thread and some comments may be shown as answers.

Kendo grid saveAsExcel issue

1 Answer 246 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cristina
Top achievements
Rank 1
Cristina asked on 16 Nov 2016, 10:11 AM
Hello,
I have a problem with saving excel. I need to save it synchronously.
For pdf there is:
 var $grid = $('#grid').data('kendoGrid');
 $grid.saveAsPDF().then(function () {});
 I need the same functionality for excel, but I dindn't found any. Basically I need to execute $grid.saveAsExcel(); then after that to do something like alert("Excel export is done!"); but now alert is displayed before $grid.saveAsExcel() finish to execute.
 Please provide a solution. Thanks.

1 Answer, 1 is accepted

Sort by
0
Stephen
Top achievements
Rank 2
answered on 16 Nov 2016, 08:39 PM

You could try using the "excelExport" event, http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-excelExport.

During this event, the operation is not technically complete, but the workbook object has been created and all the data is there...all that hasn't happened yet is the actual download of the XLSX file.

Tags
Grid
Asked by
Cristina
Top achievements
Rank 1
Answers by
Stephen
Top achievements
Rank 2
Share this question
or