Table of Contents

Method Number

Namespace
DocWright.Formats.Xlsx
Assembly
DocWright.Formats.Xlsx.dll

Number(decimal)

Creates a numeric value.

public static XlsxCellValue Number(decimal value)

Parameters

value decimal

The 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

value double

The 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.