Message-ID: <2059542319.8077.1711631469747.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8076_693930847.1711631469747" ------=_Part_8076_693930847.1711631469747 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
NumberFormat is a helper class= that creates custom number format strings, which are used for formatting n= umbers and dates. Use Style.Num= berFormat to set a number format for a specific style.
=20public sealed class NumberFormat=20
Public NotInheritable Class NumberFormat=20
//--- Open a workbook. ExcelApplication xla =3D new ExcelApplication(); Workbook wb =3D xla.Open(@"C:\report.xls"); //--- Create a style. Style percentStyle =3D wb.CreateStyle(); //--- Specify that the number format for the style is a percentag= e with three //--- decimal places (0.000%). //--- The following line is equivalent to percentStyle.NumberForm= at =3D "0.000%" percentStyle.NumberFormat =3D wb.NumberFormat.CreatePercentage(3)= ;=20
'--- Open a workbook. Dim xla As New ExcelApplication() Dim wb As Workbook =3D xla.Open("C:\report.xls") '--- Create a style. Dim percentStyle As Style =3D wb.CreateStyle() '--- Specify that the number format for the style is a percentage= with three '--- decimal places (0.000%). '--- The following line is equivalent to percentStyle.NumberForma= t =3D "0.000%" percentStyle.NumberFormat =3D wb.NumberFormat.CreatePercentage(3)=20
Name | =20
Description | =20
---|---|
=20 | Creates an accounting format string. | =20
CreateCurrency(Int32, Boolean, Boolean, Boolean, NumberFormat.Color)= | =20
Creates a format string for displaying currency = values. | =20
CreateCurrency(Int32, Boolean, Boolean, NumberFormat.Color, String, = String, Boolean, Boolean) | =20
Creates a format string for displaying currency = values, and allows locale-specific currency symbols. | =20
=20 | Creates a string for displaying fractions. | = =20
=20 | Creates a string for displaying fractions. | = =20
CreateNumber(Int32, Boolean, Boolean, Boolean, Boolean, NumberFormat= .Color) | =20
Creates a format string for displaying numbers.<= /td>=20 |
=20 | Creates a string for displaying percentages. | =20
=20 | Creates a scientific number format string. | = =20
Name | =20
Description | =20
---|---|
=20 | The Col= or enumeration contains the colors that can be used to display neg= ative numbers in a NumberFormat.<= /td>=20 |
=20 | NumberForm= at values for Date data types | =20
=20 | NumberForm= at values for specialized American numbers | =20
=20 | NumberForm= at values for Time data types | =20