Kendo grid saveAsExcel issue

2 posts, 0 answers
  1. Cristina
    Cristina avatar
    6 posts
    Member since:
    Mar 2015

    Posted 16 Nov 2016 Link to this post

    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.
  2. Stephen
    Stephen avatar
    90 posts
    Member since:
    Jan 2011

    Posted 16 Nov 2016 in reply to Cristina Link to this post

    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.

Back to Top