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

Radgrid exporting to excel using html format has issue with date formating

1 Answer 136 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ADV Dev
Top achievements
Rank 1
ADV Dev asked on 14 Feb 2015, 08:29 PM
Hi,

I am using radgrid excel export using html format. In radgrid ExportCellFormatting event we are formatting the date column as below 

 If e.FormattedColumn.UniqueName = "t_UploadedOn" Then
    e.Cell.Style("mso-number-format") = "dd\-mm\-yyyy\ HH\:mm\:ss\"
End If

The above works fine if date is something like 29-01-2015, but if date is like 1st of Feb 2015 then it will show as 02-01-2015. Please see the attached screen grab of recent export.

Any help would be greatly appreciated.
 

1 Answer, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 18 Feb 2015, 04:50 PM
Hello,

Microsoft Excel parses the value automatically. I'm afraid that we do not have control over the value parsing. A possible solution would be to convert the values manually before exporting.

Regards,
Daniel
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
ADV Dev
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or