Kendo Angular: Export multiple grids to one Excel doc

1 Answer 325 Views
Excel Export Grid
Tyler
Top achievements
Rank 1
Iron
Tyler asked on 30 Apr 2021, 01:13 PM

Good day,

I am trying to export multiple girds (from an external button request) into one Excel doc, with each grid in its own sheet. I cannot get it quite right, and cannot find any example that can help me (the export multiple data sets from the Excel Export section looks close, but the objects in the grid are different than those.

Any examples or assistance would be greatly appreciated.

Thank you,

Tyler

1 Answer, 1 is accepted

Sort by
0
Accepted
Tyler
Top achievements
Rank 1
Iron
answered on 30 Apr 2021, 03:33 PM

To answer my own question:

- On the external button, I call the active grid saveAsExcel method

- I have a onExcelExport method defined in all grids, that includes the event and the index into my grid array

- In the onExcelExport, I call event.preventDefault() so that it will not go ahead with the export.

- I hold on to all the event.workbook.sheets for until all grids have called me back.

- When I have the complete set, I create a new Workbook, and then do the saveAs like in the examples.

Very cool.

Dimiter Madjarov
Telerik team
commented on 03 May 2021, 05:03 AM

Hi Tyler,

Thank you for sharing the solution with the community.

Tags
Excel Export Grid
Asked by
Tyler
Top achievements
Rank 1
Iron
Answers by
Tyler
Top achievements
Rank 1
Iron
Share this question
or