FIXED

function FIXED(arg1: number = null, arg2: number = null, arg3: boolean = null): string

Description

Rounds a number to the specified number of decimals and returns the result as text with or without commas.

Parameters

arg1numberdefault: null

The number to round and convert to text.

arg2numberdefault: null

The number of digits to the right of the decimal point. If omitted, the function will assume it to be 2.

arg3booleandefault: null

Specifies whether do display commas in the returned text (false or omitted) or not (true).

Returns

string

Try It

var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.FIXED(1234.9, 1, false));

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).