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

[Solved] RadGrid Export to excel

3 Answers 585 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Satheesh
Top achievements
Rank 1
Satheesh asked on 29 May 2008, 07:02 AM
Hi,

I am trying to export the data from RadGrid to excel. The grid contains link buttons. While exporting some images are also getting exported to excel.

I want only the text data.

I have set the following property before exporting

ContactListGrid.PagerStyle.Visible =

false;
ContactListGrid.ExportSettings.ExportOnlyData =
false
;
ContactListGrid.ExportSettings.OpenInNewWindow = true;


<telerik:RadGrid runat="server" ID="RadGrid1" DataSourceID="AccessDataSource1" GridLines="None">
<ExportSettings>
<Pdf FontType="Subset" PaperSize="Letter" />
<Excel Format="Html" />
<Csv ColumnDelimiter="Colon" RowDelimiter="NewLine" />
</ExportSettings>

In my grid the <Excel Format = "Html"> is not available. Only <csv> and <pdf> are available.

So I cannot change the formatting option.

How we can export the content without any images and in a plain text.

I am using the RadGrid of version 5.1.3.0. Please help me in this regard.


Regards,
Anil

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 May 2008, 07:13 AM
Hi Anil,

Try setting  ExportOnlyData to true in the Export button click event to export the text and not the images.

ContactListGrid.ExportSettings.ExportOnlyData = true

Thanks
Shinu.
0
Satheesh
Top achievements
Rank 1
answered on 29 May 2008, 08:46 AM
 Hi Shinu,


That is correct. But I need the text even in the link button column.
But alongwith the text some image shadow comes in the excel sheet.

So we thought of using ExportSettings option. But it is not available for this control.
We thought of having a try with <Excel Format = "Html">. But it is not available. Is there any other way to solve this issue.


Please see the output of the export excel below.


First Name Pict
Last Name 
Email
Glenn Altemose galtemose@newdea.com
Alex Astapenko alex.astapenko@gmail.com
Michael Ayvazyan michael@pilgrimcs.com.ua
Penny Bailey pbailey@newdea.com
Lyn Bain llbain@chiliinteractive.com
Brooke Barickman bbarickman@newdea.com
Raghavendra Bayar raghavendra.b@lgcnsglobal.com
Oleg Bondar oleg_bondar_2001@mail.ru
Lisa Cervantes lcervantes@newdea.com
nikila chinni nikila.chinni@lgcnsglobal.com


There is a sort icon in the second column. It comes as a gray box in the excel.

How can we avoid this gray box and get only the text in it?



Regards,
Anil 





0
Princy
Top achievements
Rank 2
answered on 29 May 2008, 11:05 AM
Hi,

Go through the following help article and see whether it is helpful.
Exporting tips and tricks

Thanks
Princy.
Tags
Grid
Asked by
Satheesh
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Satheesh
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or