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

RadGrid Export to CSV or Excel - how to export to multiple sheets

1 Answer 203 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andrei Sinelnikov
Top achievements
Rank 1
Andrei Sinelnikov asked on 18 Aug 2010, 11:08 PM
Hello,

I have RadGrid binded to the data source (DataSet). DataSet have 2 tables unrelated to each other.
I want to export each table to separate sheets. Is it possible?

Another question - can I change sheet name? Right now it is derived from file name. I want to be able to specify it myself.


Thank you,

Andrei

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 24 Aug 2010, 12:16 PM
Hello Andrei,

You could use the following code-library as a starting point:
Multiple worksheets in ExcelML

As to your second question: The worksheet name can be modified via the WorksheetElement element
protected void RadGrid1_ExcelMLExportRowCreated(object source, GridExportExcelMLRowCreatedArgs e)
{
    ...
    e.Worksheet.Name = "MyWorksheet";
    ...
}

ExcelML export
ExcelML structure / GridExcelBuilder

I hope this helps

Best regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Andrei Sinelnikov
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or