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

Error in Export to Excel if the cell in grid has data like this: <DATA>

5 Answers 61 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Prithvi
Top achievements
Rank 1
Prithvi asked on 05 Jul 2012, 09:00 AM
Error in Export to Excel if the cell in grid has data like this:  <DATA>

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 05 Jul 2012, 09:15 AM
Hello,

 May I ask you what exoprt format do you use for the export? What is the error that you talk about?

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Prithvi
Top achievements
Rank 1
answered on 05 Jul 2012, 09:40 AM

 

Hi,

Error screen shots are attached, please look into that.

ExportFormat
format = ExportFormat.ExcelML;

Prithvi

 

0
Dimitrina
Telerik team
answered on 05 Jul 2012, 09:59 AM
Hello,

 The error you got is because you are not allowed to export '<data>' as a value. You could subscribe for the ElementExporting event of the RadGridView and remove the tags '<' and '>' from the value to be exported.

Please let me know how this works for you. 

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Prithvi
Top achievements
Rank 1
answered on 05 Jul 2012, 12:02 PM
Hi,

Prblm is solved!!!

Can I give the default name for the excel sheet instead of default name "worksheet1" in the code behind?


Thanks,
Prithvi
0
Dimitrina
Telerik team
answered on 05 Jul 2012, 01:34 PM
Hello,

Unfortunately this is not supported. You could generate the Excel file yourself and export the data iterating through the Items collection of the GridView. 

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Prithvi
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Prithvi
Top achievements
Rank 1
Share this question
or