TEXT
function TEXT(arg1: number | string = null, arg2: string = null): string
Description
Converts a value to text in a specific number format.
Parameters
- arg1
number | string
null A number, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value.
- arg2
string
null A number format in the text form from the Number format combo box on the Home tab.
Returns
string
Try It
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.TEXT(45.5, "$0.00"));