Attention: We have retired the ASP.NET Community Blogs. Learn more >

Tip 4 : Microsoft Office Excel XML : Use the Correct DateTime Format to Avoid Error

The correct format for DateTime data type in an Excel XML cell is yyyy-MM-ddTHH:mm:ss.fff. Using other formats will give you an error of The file cannot be opened because of errors when you open the Excel xml file.

Sample code and value for the correct format:

image xml

Sample code and value for the incorrect format:

image xml

 

2 Comments

Comments have been disabled for this content.