Click or drag to resize

IXLSRange DateTimeValue Property

Gets / sets DateTime contained by this cell. Read-write DateTime.
Examples
The following code illustrates how to set and access DateTimeValue property of the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set and get the DateTimeValue of specified range</para><para>worksheet.Range[2, 4].DateTimeValue = DateTime.Now;</para><para>DateTime dateTime = worksheet.Range[2, 4].DateTimeValue;</para><para>//Save to file</para><para>workbook.SaveToFile("DateTimeValue.xlsx");</para>

Namespace: Spire.Xls.Core
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
DateTime DateTimeValue { get; set; }

Property Value

Type: DateTime
See Also