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
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
arg1 | Required | ApiRange | ApiName | number | The number to round and convert to text. | |
arg2 | Optional | ApiRange | ApiName | number | The number of digits to the right of the decimal point. If omitted, the function will assume it to be 2. | |
arg3 | Optional | ApiRange | ApiName | boolean | Specifies whether do display commas in the returned text (-false or omitted) or not (-true). |
Returns
string
Example
- Code
- Result
let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.FIXED(1234.9, 1, false));