One possible solution that I can suggest is to change the header text of the columns just before executing the export action and restore the column names afterwards.
An alternative approach, in case you are using the GridViewSpreadExport
which utilizes our RadSpreadProcessing
library to export the content of RadGridView
to xlsx, csv, pdf and txt formats, is to handle the ExportCompleted
event which is triggered when the export operation completes. Once you have the exported grid data, you can benefit from the RadSpreadProcessing
library, load the Excel file and change the columns names in the workbook:https://docs.telerik.com/devtools/winforms/controls/gridview/exporting-data/spread-export https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/working-with-workbooks/create-open-and-save-workbooks https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/working-with-cells/accessing-cells-of-worksheet
Feel free to use this approach which suits your requirements best.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Dess | Tech Support Engineer, Sr.
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.