Page tree
Skip to end of metadata
Go to start of metadata

Description

Creates a format string for displaying currency values, and allows locale-specific currency symbols.

C#
vb.net

Parameters

numDecimalPlaces
The number of decimal places to display.
useNegativeSign
If true, the negative sign will be used for negative values.
useParensForNegatives
If true, negative numbers will be shown in parentheses.
negativeColor
A color to use when displaying negative numbers. negativeColor may be null.
currencySymbol
A string representing the currency symbol. This could be the individual Unicode character for the currency symbol (such as the dollar, pound, euro, etc) or the alphabetic representation of the currency symbol (such as USD, GBP, EUR, etc). If this value is null, no currency string or formatting will be inserted.
localeCode
A string representing the Windows locale code, used for determining display on localized versions of Excel. This is optional, and can be null.
currencyAtFront
If the currencySymbol is non-null, this param determines if the currency string will appear before the number or after. If true, the symbol will appear before the value. If currencySymbol is null, this value is ignored.
spaceBetween
If the currencySymbol is non-null, and this param is true, a space will appear between the currency symbol and the value. If currencySymbol is null, this value is ignored.

Returns

A currency format string.

Examples

C#
vb.net
  • No labels