A newer version of this page is available. Switch to the current version.

XlFormattingObject.FormatType Property

Gets or sets the type of formatting applied to the current value.

Namespace: DevExpress.Export

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

Declaration

public FormatType FormatType { get; set; }

Property Value

Type Description
FormatType

The formatting type.

Available values:

Name Description
None

No formatting is performed.

Setting the FormatInfo.FormatType property to None clears the FormatInfo.FormatString property and sets the FormatInfo.Format object to null.

Numeric

Specifies that values should be formatted as numbers.

Setting FormatInfo.FormatType to Numeric assigns the static System.Globalization.NumberFormatInfo.CurrentInfo format provider to the FormatInfo.Format property. This defines the format provider for the current culture.

Also FormatInfo.FormatString is set to an empty string.

DateTime

Specifies that values should be formatted as the DateTime type.

Setting FormatInfo.FormatType to DateTime assigns the static CurrentInfo format provider to the FormatInfo.Format property. This defines the format provider for the current culture. Also FormatInfo.FormatString is set to "d" (short date pattern).

Custom

Use Custom to format string values.

Use Custom when assigning a custom IFormatProvider to the FormatInfo.Format property.

Setting FormatInfo.FormatType to Custom does not change the FormatInfo.Format and FormatInfo.FormatString property values.

Remarks

Use the FormatType and XlFormattingObject.FormatString properties to format values based on the current language and regional settings (culture). FormatType specifies how to interpret values. FormatString specifies a format pattern appropriate for the specified formatting type. You can refer to the Standard Numeric Format Strings and Date and Time Format Strings topics in MSDN for information on format specifiers.

See Formatting Values to learn more.

See Also