Skip to main content

FIXED

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

Syntax

expression.FIXED(arg1, arg2, arg3);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe number to round and convert to text.
arg2OptionalApiRange | ApiName | numberThe number of digits to the right of the decimal point. If omitted, the function will assume it to be 2.
arg3OptionalApiRange | ApiName | booleanSpecifies whether do display commas in the returned text (-false or omitted) or not (-true).

Returns

string

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.FIXED(1234.9, 1, false));