Click or drag to resize

IXLSRange NumberFormat Property

Format of current cell. Analog of Style.NumberFormat property.
Examples
The following code illustrates how to set NumberFormat property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set data</para><para>worksheet["C2"].Value = "3100.23";</para><para>//Set number format</para><para>worksheet["C2"].NumberFormat = "#,##1.##";</para><para>//Save to file</para><para>workbook.SaveToFile("NumberFormat.xlsx");</para>

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

Property Value

Type: String
See Also