Message-ID: <1537343344.7841.1711623659658.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_7840_1936749389.1711623659658" ------=_Part_7840_1936749389.1711623659658 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html NumberFormat.CreateCurrency(Int32, Boolean, Boolean, NumberForma= t.Color, String, String, Boolean, Boolean)

NumberFormat.CreateCurrency(Int32, Boolean, Boolean, NumberFormat.C= olor, String, String, Boolean, Boolean)

Description

=20

Creates a format string for displaying currency values, and allows local= e-specific currency symbols.

=20
C#
=20
 public System.String CreateCurrency(int numDecimalPlaces, boolean useNegat=
iveSign, boolean useParensForNegatives, Color negativeColor, System.String =
currencySymbol, System.String localeCode, boolean currencyAtFront, boolean =
spaceBetween)
=20
=20
vb.net
=20
Public Function CreateCurrency(ByVal numDecimalPlaces As Integer, ByVal use=
NegativeSign As Boolean, ByVal useParensForNegatives As Boolean, ByVal nega=
tiveColor As Color, ByVal currencySymbol As String, ByVal localeCode As Str=
ing, _
=09=09ByVal currencyAtFront As Boolean, ByVal spaceBetween As Boolean) As S=
tring
=20
=20

Parameters

=20
numDecimalPlaces
= The number of decimal places to display.=20
useNegativeSign
If= =20 true, the negative sign will be used for negative values.=20
useParensForNegat= ives
If=20 true, negative numbers will be shown in parentheses.=20
negativeColor
A colo= r to use when displaying negative numbers.=20 negativeColor may be null.=20
currencySymbol
A st= ring representing the currency symbol. This could be the individual Unicode= character for the currency symbol (such as the dollar, pound, euro, etc) o= r the alphabetic representation of the currency symbol (such as USD, GBP, E= UR, etc). If this value is null, no currency string or formatting will be i= nserted.=20
localeCode
A string rep= resenting the Windows locale code, used for determining display on localize= d versions of Excel. This is optional, and can be null.=20
currencyAtFront
If= the currencySymbol is non-null, this param determines if the currency stri= ng will appear before the number or after. If true, the symbol will appear = before the value. If currencySymbol is null, this value is ignored.=20
spaceBetween
If the c= urrencySymbol is non-null, and this param is true, a space will appear betw= een the currency symbol and the value. If currencySymbol is null, this valu= e is ignored.=20

Returns

A currency format = string.=20

Examples

=20
C#
=20

          //--- Create a style.
          Style styl =3D wb.CreateStyle();

          //--- The following assigns the currency string "[$=E2=82=AC=
-2] #,##0.00;[Red][$=E2=82=AC-2] #,##0.00"
          //--- to the style, which will use the Euro symbol prior to the v=
alues, with the
          //--- color red for negative values.
          styl.NumberFormat =3D wb.NumberFormat.CreateCurrency(2,
               false,
               false,
               NumberFormat.Color.Red,
               "=E2=82=AC",
               "2",
               true,
               true);
        
=20
=20
vb.net
=20

          '--- Create a style.
          Dim styl As Style =3D wb.CreateStyle()

          '--- The following assigns the currency string "[$=E2=82=AC-=
2] #,##0.00;[Red][$=E2=82=AC-2] #,##0.00"
          '--- to the style, which will use the Euro symbol prior to the va=
lues, with the
          '--- color red for negative values.
          styl.NumberFormat =3D wb.NumberFormat.CreateCurrency(2, _
               False, _
               False, _
               NumberFormat.Color.Red, _
               "=E2=82=AC", _
               "2", _
               True, _
               True)
        
=20
------=_Part_7840_1936749389.1711623659658--