DOLLAR

function DOLLAR(arg1: number | string = null, arg2: number = null): string

Description

Converts a number to text, using a currency format $#.##.

Parameters

arg1number | stringdefault: null

A number, a reference to a cell containing a number, or a formula that returns a number.

arg2numberdefault: 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));

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).