Skip to main content

XlFormattingObject.NumberFormat Property

Gets or sets the native Excel format string used to format the currently processed value.

Namespace: DevExpress.Export

Assembly: DevExpress.Printing.v24.2.Core.dll

Declaration

public XlNumberFormat NumberFormat { get; set; }

Property Value

Type Description
XlNumberFormat

A string value, representing the XLSX format string.

Remarks

Note

The NumberFormat property is ignored if formatting settings are provided using the XlFormattingObject.FormatType and XlFormattingObject.FormatString properties.

The following list shows format specifiers that can be assigned to the NumberFormat property:

  • 0
  • 0.00
  • #,##0
  • #,##0.00
  • #,##0_);(#,##0)
  • #,##0_);[Red](#,##0)
  • #,##0.00_);(#,##0.00)
  • #,##0.00_);[Red](#,##0.00)
  • $#,##0_);($#,##0)
  • $#,##0_);[Red]($#,##0)
  • $#,##0.00_);($#,##0.00)
  • $#,##0.00_);[Red]($#,##0.00)
  • 0%
  • 0.00%
  • 0.00E+00
  • ##0.0E+0
  • # ?/?
  • # ??/??
  • m/d/yyyy
  • d-mmm-yy
  • d-mmm
  • mmm-yy
  • h:mm AM/PM
  • h:mm:ss AM/PM
  • h:mm
  • h:mm:ss
  • m/d/yyyy h:mm
  • mm:ss
  • mm:ss.0
  • @
  • ($* #,##0);($* (#,##0);($* “-“);(@_)
  • (* #,##0);(* (#,##0);(* “-“);(@_)
  • ($* #,##0.00);($* (#,##0.00);($* “-“??);(@_)
  • (* #,##0.00);(* (#,##0.00);(* “-“??);(@_)

For information on these format specifiers, refer to the following topic from the MS Excel documentation: Create or delete a custom number format.

See Also