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

Gridview Excel Export issue

1 Answer 85 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sree
Top achievements
Rank 1
Sree asked on 14 Jan 2013, 03:33 AM
Hello Team
i used Gridview excel export to some xxxx.xls , Export is done, but instead of exporting the gridview columns to excel columns, it is exporting everything to one single excel column, is there any setting to be done with the gridview,

Can you please help me

my Code is

var exporter = new ExportToExcelML(this.radgridview1);
               
                string fileName = "C:\\ACDV.xls";   
                exporter.SheetName = "Sheet";
                exporter.SheetMaxRows = ExcelMaxRows._65536 ;      
                exporter.RunExport(fileName);

the same export function to .csv is working fine, but the data is coming in enclosed quotes, which exported to database table showing data in enclosed quotes something like

"1"  "2.5"  "3"  "5"  "6"
"2"  "7.1"  "0"  "6"  "7"

i need data without enclosed quotes, there is an option in ajax gridview with option enclosedquotes=true/false but in winforms rad gridview there is no such option , please help me in achieving either of one method stated above

Regards
Lakshmi
               

1 Answer, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 16 Jan 2013, 12:11 PM
Hi Lakshmi,

Thank you for writing.

I tried to reproduce the issue you have described with the export to excel, but I was unable to. I would kindly ask you to send me an example project where you are able to reproduce the issue so I can investigate it further.

On the export to CSV the quotations are used to enclose values. Because the CSV uses a special symbol to separate values there must be a way to tell the difference between a comma separating values and a comma that is part of a value. We have already added a feature request for adding a property allowing quotes to be turned off as per your request from the previous support ticket. We will try to include this feature in our next major release. For the time being, you can use the workaround provided by my colleague.

Looking forward to your reply regarding the issue you are experiencing with export to Excel.

Kind regards,
Ivan Petrov
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
GridView
Asked by
Sree
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Share this question
or