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

Kendo UI Grid Export to excel with extra info in the file?

1 Answer 247 Views
Grid
This is a migrated thread and some comments may be shown as answers.
reader
Top achievements
Rank 1
reader asked on 19 Feb 2015, 09:47 PM
I have an application which uses Kendo UI grid. The excel export features works fine. Now, I added some extra controls on the page. User can select some values, and then click 'refresh' button to update the data source of the grid. So that the grid won't load too much data all in once.The question is: the export will export whatever on the screen (including all pages). When user opens the excel file, he/she won't know what parameters used to generate this.

For example, on the page, it has a date control, use select 1/1/2015, click refresh, grid shows all data for that date.

When export, how the user know this selected date? It is not in the columns in grid.What I want to have is an extra row at the top, which shows something like:

Date: 1/1/2015, Para2: value2, ...

Is this possible in current Kendo ui grid? or have to manipulate the excel file (which we want to avoid at any cost)?

Thanks

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 20 Feb 2015, 08:07 AM
Hello,

Yes, this is possible. You have to customize the excel document by handling the excelExport event. More info can be found here.

Regards,
Atanas Korchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Sai
Top achievements
Rank 1
commented on 27 Mar 2023, 05:12 PM

This link is broken. Can you please update the URL?
Nikolay
Telerik team
commented on 29 Mar 2023, 10:14 AM

Hi Sai,

This part of the article is no longer existing, however, I will post it here so anyone can benefit from it. It is still valid for the latest Kendo UI Grid:

To customize the generated Excel file, use the excelExport event. The `workbook` event argument exposes the generated Excel workbook configuration.

 - For more information on Excel export, refer to the introductory article on Excel and the Excel Export Appearance article.
 - For more information on setting the background color of alternating rows while exporting the Grid to Excel, refer to this example.

Regards,

Nikolay

Tags
Grid
Asked by
reader
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or