Click or drag to resize

IXLSRange Value2 Property

Returns or sets the cell value. Read/write Variant. The only difference between this property and the Value property is that the Value2 property doesn't use the Currency and Date data types.
Examples
The following code illustrates how to access Value2 property of the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Assigning Value2 property of the Range</para><para>worksheet["A1"].Value2 = DateTime.Now;</para><para>worksheet["A3"].Value2 = false;</para><para>//Checking Range types</para><para>Console.WriteLine(worksheet["A1"].HasDateTime);</para><para>Console.WriteLine(worksheet["A3"].HasBoolean);</para>

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

Property Value

Type: Object
See Also