NumberFormat is a helper class that creates custom number format strings, which are used for formatting numbers and dates. Use Style.NumberFormat to set a number format for a specific style.

 public sealed class NumberFormat
Public NotInheritable Class NumberFormat

          //--- Open a workbook.
          ExcelApplication xla = new ExcelApplication();
          Workbook wb = xla.Open(@"C:\report.xls");

          //--- Create a style.
          Style percentStyle = 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.NumberFormat = "0.000%"
          percentStyle.NumberFormat = wb.NumberFormat.CreatePercentage(3);
        

          '--- Open a workbook.
          Dim xla As New ExcelApplication()
          Dim wb As Workbook = xla.Open("C:\report.xls")

          '--- Create a style.
          Dim percentStyle As Style = 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.NumberFormat = "0.000%"
          percentStyle.NumberFormat = wb.NumberFormat.CreatePercentage(3)
        

Name

Description

CreateAccounting(Int32, Boolean, NumberFormat.Color)

CreateCurrency(Int32, Boolean, Boolean, Boolean, NumberFormat.Color)

CreateCurrency(Int32, Boolean, Boolean, NumberFormat.Color, String, String, Boolean, Boolean)

CreateFraction(Int32)

CreateFraction(Int32, Int32)

CreateNumber(Int32, Boolean, Boolean, Boolean, Boolean, NumberFormat.Color)

CreatePercentage(Int32)

CreateScientific(Int32)

Name

Description

Color

DateFormat

Special_EN_US

TimeFormat