We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting and existing Colum as a date

Thread ID:





106538 Jan 13,2013 07:38 PM UTC Jan 16,2013 11:04 AM UTC ASP.NET Web Forms (Classic) 2
Tags: XlsIO
Gordon Hooton
Asked On January 13, 2013 07:38 PM UTC

Have tried a number of ways to set a existing column of dates i.e "24/3/2012" "dd/mm/yyyy" from text to date format.
Tried code such as

matchedsheet.Columns[0].CellStyle.NumberFormat = "dd/mm/yyyy hh:mm:ss";  and
matchedsheet.Columns[0].CellStyle.NumberFormat = "*dd/mm/yyyy hh:mm:ss"  and range.CellStyle.NumberFormatIndex = 14; and
range.CellStyle.NumberFormatIndex = "D4";

all to no avail.
The column has a heading "Process Date' all other entries are like "24/3/2012"

Has anyone any thoughts on how to force an existing column to be formatted as date, or as a number ?

Thanks and regards


Gordon Hooton
Replied On January 13, 2013 07:39 PM UTC

Just to correct the heading of this post

Manikandan M [Syncfusion]
Replied On January 16, 2013 11:04 AM UTC

Hi Gordon,

Thanks for using Syncfusion products.

We are afraid that we are able to reproduce the issue "Numberformat is not set to already existing cell with datatime as value and text type as format". We have created the simplified sample to reproduce the issue and have attached the same in the below link.

Sample link:106358_Forum.zip

Reference runnable video:Forum106358Video.zip

If the above attached sample does not meet with your sample scenario, please modify the sample and revert back to us. So that we can proceed further on this issue.

Thank you very much for your patience.

Please let us know if you need any clarifications.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon