Converts a value to text in a specific number format.
Name | Type | Description |
arg1 | number | string | A number, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value. |
arg2 | string | A number format in the text form from the Number format combo box on the Home tab. |
builder.CreateFile("xlsx"); var oWorksheet = Api.GetActiveSheet(); var oFunction = Api.GetWorksheetFunction(); oWorksheet.GetRange("A1").SetValue(oFunction.TEXT(45.5, "$0.00")); builder.SaveFile("xlsx", "TEXT.xlsx"); builder.CloseFile();