Hi:
My radgrid have a text column with values 1/2, LARGE, MEDIUM..etc
When I export the grid to excel or csv the value LARGE, MEDIUM show up fine..
BUT
1/2 values are exported as 2-Jan and if you click in the actual cell the value showed is 1/1/2012
I try setting the column to datatype to System.String, but same results.
Jose
5 Answers, 1 is accepted
0

Jayesh Goyani
Top achievements
Rank 2
answered on 09 Jun 2012, 06:22 PM
Hello,
Please check below link.
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-export-to-csv.aspx#1752154
Thanks,
Jayesh Goyani
Please check below link.
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-export-to-csv.aspx#1752154
Thanks,
Jayesh Goyani
0

wnl
Top achievements
Rank 1
answered on 29 Oct 2012, 02:36 PM
I have the same problem.
I tried to use: e.Cell.Style["mso-number-format"] = @"\@";
but same results.
Any suggestions?
I tried to use: e.Cell.Style["mso-number-format"] = @"\@";
but same results.
Any suggestions?
0
Hi,
You could check out this forum post and also this help article which elaborate on this matter. Test the provided approaches and if the issue still persist you could open a support ticket and send us a runnable project in order to observe the issue locally.
Kind regards,
Kostadin
the Telerik team
You could check out this forum post and also this help article which elaborate on this matter. Test the provided approaches and if the issue still persist you could open a support ticket and send us a runnable project in order to observe the issue locally.
Kind regards,
Kostadin
the Telerik team
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 their blog feed now.
0

Jose
Top achievements
Rank 2
answered on 31 Oct 2012, 01:41 PM
the problem still there.
when I export to excel the radgrid column with "1/2" value is exported to excel as "1/1/2012" (as a date)
Jose
when I export to excel the radgrid column with "1/2" value is exported to excel as "1/1/2012" (as a date)
Jose
0
Hi Jose,
I prepared a sample with two RadGrids. The first grid export the value "1/2" as number, and the second one export it as a date. I used the following code:
Check out the attached project.
All the best,
Kostadin
the Telerik team
I prepared a sample with two RadGrids. The first grid export the value "1/2" as number, and the second one export it as a date. I used the following code:
protected
void
RadGrid1_ExportCellFormatting(
object
sender, ExportCellFormattingEventArgs e)
{
if
(e.FormattedColumn.UniqueName ==
"Number"
)
{
e.Cell.Style[
"mso-number-format"
] = @
"\@"
;
}
}
Check out the attached project.
All the best,
Kostadin
the Telerik team
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 their blog feed now.