Method Number
Number(decimal)
Creates a numeric value.
public static XlsxCellValue Number(decimal value)
Parameters
valuedecimalThe number.
Returns
- XlsxCellValue
The value.
Number(double)
Creates a numeric value from a double, rounded to 15 significant digits.
public static XlsxCellValue Number(double value)
Parameters
valuedoubleThe number.
Returns
- XlsxCellValue
The value.
Remarks
See the type's remarks for why the conversion happens here rather than at serialization time, and what a magnitude outside decimal's range costs. NaN and the infinities have no numeric cell in SpreadsheetML and become the error literals Excel itself uses.