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

[Solved] ExportToExcel in radgrid convert varchar fields to numeric

1 Answer 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Raghavan Subramanian
Top achievements
Rank 1
Raghavan Subramanian asked on 02 Oct 2009, 03:27 PM

Hi,

I am having problem when exporting radgrid to excel, the varchar fields in radgrid converted to numeric in excel.

For example, '00089' in radgrid in converted to '89' in excel.

Please give any suggestions to fix this.

Thanks in advance.

Regards,
Rags

1 Answer, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 02 Oct 2009, 03:54 PM
Hello Raghavan,

You can avoid the unwanted behavior either by inserting   tags or setting the proper number format on ExcelExportCellFormatting event:
http://www.telerik.com/community/forums/aspnet-ajax/grid/202142-export-to-excel-problem.aspx
http://www.telerik.com/community/forums/aspnet-ajax/grid/grid-export-to-excel-how-to-format-cells-as-text.aspx
mso-number-format

Regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Raghavan Subramanian
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or