Formatting cells as time values


How would I format a column of cells to be type "Time"? What I want is similar to setting the Category to "Time" and the Type to a particular format as is done in Excel by using the Format Cells dialog box.

Thanks...

Sean

1 Reply

MW Melba Winshia Syncfusion Team June 28, 2007 08:15 AM UTC

Hi Sean,

You can format cells as time values by using the following code snippets:

[C#]

sheet.Range["C2"].NumberFormat = "h:mm:ss";

Here is the sample for your reference:

http://websamples.syncfusion.com/samples/XlsIO.Windows/63089/main.htm

Kindly let me know if you have any other questions.

Thanks,
Melba

Loader.
Up arrow icon