Gridview Excel Export issue

2 posts, 0 answers
  1. Sree
    Sree avatar
    30 posts
    Member since:
    Dec 2012

    Posted 13 Jan 2013 Link to this post

    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 ;      

    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


  2. Ivan Petrov
    Ivan Petrov avatar
    717 posts

    Posted 16 Jan 2013 Link to this post

    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.
Back to Top