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

Exporting data to Excel

5 Answers 192 Views
Grid
This is a migrated thread and some comments may be shown as answers.
anna
Top achievements
Rank 1
anna asked on 29 Apr 2008, 08:33 PM
I am trying to export data from RadGrid to Excel. code is
RadGrid1.ExportSettings.ExportOnlyData = True
RadGrid1.ExportSettings.IgnorePaging = True
RadGrid1.ExportSettings.OpenInNewWindow = True
RadGrid1.MasterTableView.ExportToExcel()
I have few columns as Hyperlink in my grid. Excel file has all the data except the Hyperlink data. Its missing data in those columns. Showing those columns empty in Excel file.
What should I do to have all the data in my excel file? need help..

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 30 Apr 2008, 04:46 AM
Hi Anna,

Exporting GridButtonColumn/GridTemplateColumn/GridHyperLinkColumn data:

The GridButtonColumns in Telerik RadGrid have LinkButtons/PushButtons/ImageButtons in their cells. They are not considered as data,that is why when you select the second parameter(ExportOnlyData) of the ExportToExcel method to be true, those buttons will be stripped from the resulting Excel file.
I hope the following help article will help you to sort out the problem.
Exporting tips and tricks

Shinu.
0
Ryan
Top achievements
Rank 1
answered on 20 Jun 2013, 07:01 PM
Shinu has a great explanation of why it _won't work_, but what about how to get export to work with GridButtonColumns ?

For example, how can we tell export to take the value : LinkButton.Text to export?

Thanks.
0
Daniel
Telerik team
answered on 25 Jun 2013, 05:48 AM
Hello Ryan,

Which export format is used in your project - HTML, ExcelML or BIFF? This information will help me provide to-the-point answer.

Regards,
Daniel
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Ryan
Top achievements
Rank 1
answered on 26 Jun 2013, 02:03 PM
Just normal excel , I believe ExcelML .
0
Kostadin
Telerik team
answered on 01 Jul 2013, 08:35 AM
Hello Ryan,

In this case you are using Html Based export. In order to export the buttons text you have to set ExportOnlyData property to false.

Regards,
Kostadin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
anna
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Ryan
Top achievements
Rank 1
Daniel
Telerik team
Kostadin
Telerik team
Share this question
or