DOLLAR
function DOLLAR(arg1: number | string = null, arg2: number = null): string
Description
Converts a number to text, using a currency format $#.##.
Parameters
- arg1
number | string
null A number, a reference to a cell containing a number, or a formula that returns a number.
- arg2
number
null A number of digits to the right of the decimal point. The number is rounded as necessary. If it is omitted, the function will assume it to be 2.
Returns
string
Try It
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.DOLLAR(98.9997, 3));