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

Export to Excel

4 Answers 48 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 22 Feb 2011, 03:31 PM
Hello Telerik,
We have problem opening excel file.
We exported list of customers to excel. If customer name contains html tag in there name error occurred. 

4 Answers, 1 is accepted

Sort by
0
Yordanka
Telerik team
answered on 22 Feb 2011, 03:55 PM
Hi DCMS,

Could you specify the html tag which causes error ?
 
Kind regards,
Yordanka
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jan
Top achievements
Rank 1
answered on 22 Feb 2011, 04:20 PM
Hello Yordanka,
Thank you for your answer.

If we name customer "Beer factory 1 <amsterdam>", and export data with this value error occurred.

Best Regards,
DCMS
0
Pavel Pavlov
Telerik team
answered on 23 Feb 2011, 03:13 PM
Hello DCMS,

I have checked the issue . Here are my findings :

RadGridView when exporting does not process the content additionally . It keeps it in its original state.
So when using special symbols in data, indeed the may conflict with HTML encoding.

Now the solution :

You will need to handle the Exporting event of RadGridView.
Inside of the event handler you will need to take care of escaping the HTML problematic characters ( e.g. replacing  "<" with &lt;   e.t.c.


Best wishes,
Pavel Pavlov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jan
Top achievements
Rank 1
answered on 01 Mar 2011, 03:09 PM
Hello Telerik,

Problem is solved.
Thank you.
Tags
GridView
Asked by
Jan
Top achievements
Rank 1
Answers by
Yordanka
Telerik team
Jan
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Share this question
or