Hi,
The data format string 'MMM' display a point (janv.) with culture 'fr-FR'.
But when whe export data in Excel, it is not recognize like a date and user can't change display for another date format.
Can you help me to display abreviate month without point like 'en-GB', for compatibility with Excel date format.
Anne
Precisions :
The data format string 'MMM' display a point (janv.) with culture 'fr-FR'.
But when whe export data in Excel, it is not recognize like a date and user can't change display for another date format.
Can you help me to display abreviate month without point like 'en-GB', for compatibility with Excel date format.
Anne
Precisions :
DataFormatString
="{0:dd-MMM-yy}" = 03-janv.-11 (fr-FR)
DataFormatString="{0:dd-MMM-yy}" = 03-jan-11 (en-GB)
5 Answers, 1 is accepted
0
Hello Anne,
You shouldn't change the number format directly as Microsoft Excel won't recognize the dates properly. Instead, leave the values in their default format and use mso-number-format style to set it to French.
For more information, please examine the following link:
Word/Excel export (HTML-based)
Best regards,
Daniel
the Telerik team
You shouldn't change the number format directly as Microsoft Excel won't recognize the dates properly. Instead, leave the values in their default format and use mso-number-format style to set it to French.
For more information, please examine the following link:
Word/Excel export (HTML-based)
Best regards,
Daniel
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Anne
Top achievements
Rank 1
answered on 01 Jul 2011, 01:53 PM
Hello Daniel,
Thanks for your anwer.
I add this code :
And in Excel, it is the same result : 03-janv.-11
Why Telerik Grid display a point ?
Regards,
Anne
Thanks for your anwer.
I add this code :
Private
Sub
MyRadGrid_ExportCellFormatting(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.ExportCellFormattingEventArgs)
Handles
MyRadGrid.ExportCellFormatting
Select
Case
e.FormattedColumn.UniqueName
Case
"MyDate"
If
sculture =
"fr-FR"
Then
e.Cell.Style(
"mso-number-format"
) =
"dd-MMM-yy"
End
If
Exit
Select
End
Select
End
Sub
And in Excel, it is the same result : 03-janv.-11
Why Telerik Grid display a point ?
Regards,
Anne
0
Hello Anne,
Please test the attached project and let me know whether it works properly at your side.
Regards,
Daniel
the Telerik team
Please test the attached project and let me know whether it works properly at your side.
Regards,
Daniel
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
0

Anne
Top achievements
Rank 1
answered on 11 Jul 2011, 11:13 AM
Hello Daniel,
I tested your project which works properly on my PC (VS2008).
On my owner project, I delete the DataFormatString on a datetime column of my RadGrid. The Format of excel export is good
dd-MMM-yy = 03-janv-11
But I don't want delete the DataFormatString of my RadGrid.
Regards,
Anne
I tested your project which works properly on my PC (VS2008).
On my owner project, I delete the DataFormatString on a datetime column of my RadGrid. The Format of excel export is good
dd-MMM-yy = 03-janv-11
But I don't want delete the DataFormatString of my RadGrid.
Regards,
Anne
0
Hello Anne,
You don't have to drop the DataFormatString properies. The solution is simple - in the export button's handler (when using external button) or in the ItemCommand event (when using the built-in buttons) traverse all columns and clear the aforementioned property. This setup won't break the existing functionality of your website.
Regards,
Daniel
the Telerik team
You don't have to drop the DataFormatString properies. The solution is simple - in the export button's handler (when using external button) or in the ItemCommand event (when using the built-in buttons) traverse all columns and clear the aforementioned property. This setup won't break the existing functionality of your website.
Regards,
Daniel
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!