TRY NEW VERSION

MROUND

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

Returns a number rounded to the desired multiple.

Parameters:

Name Type Description
arg1 any

Is the value to round.

arg2 any

Is the multiple to which you want to round number.

Returns:

Type
number | string | boolean

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.MROUND(14.35, 0.4));
builder.SaveFile("xlsx", "MROUND.xlsx");
builder.CloseFile();

Resulting document