TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

FLOOR_MATH

FLOOR_MATH(arg1, arg2, arg3) → { number | string | boolean }

Rounds a number down, to the nearest integer or to the nearest multiple of significance.

Parameters:

Name Type Description
arg1 number

Is the value you want to round.

arg2 number

Is the multiple to which you want to round.

arg3 number

When given and nonzero this function will round towards zero.

Returns:

Type
number | string | boolean

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.FLOOR_MATH(-5.5, 2, 1));
builder.SaveFile("xlsx", "FLOOR_MATH.xlsx");
builder.CloseFile();

Resulting document