TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

ROUNDDOWN

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

Rounds a number down, towards zero.

Parameters:

Name Type Description
arg1 number

Is any real number that you want rounded down.

arg2 number

Is the number of digits to which you want to round. Negative rounds to the left of the decimal point; zero or omitted, to the nearest integer.

Returns:

Type
number | string | boolean

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.ROUNDDOWN(3.456, 0));
builder.SaveFile("xlsx", "ROUNDDOWN.xlsx");
builder.CloseFile();

Resulting document