Hello, Harsha,
It seems that use GridViewSpreadExport. The spread export functionality is located in the TelerikExport.dll assembly which must be added to your project. You need to include the Telerik.WinControls.Export namespace in order to access the SpreadExportRenderer.
Then, you can use the following code snippet to export the grid:
private void radButton1_Click(object sender, EventArgs e)
{
GridViewSpreadExport spreadExporter = new GridViewSpreadExport(this.radGridView1);
SpreadExportRenderer exportRenderer = new SpreadExportRenderer();
spreadExporter.FileExportMode = FileExportMode.CreateOrOverrideFile;
spreadExporter.RunExport("D:\\exportedFile.xlsx", exportRenderer);
Process.Start("D:\\exportedFile.xlsx");
}
I hope this helps. Let me know if you have other questions.
Regards,
Nadya
Progress Telerik
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/.