跳到主要内容

ECMA_CEILING

Rounds the number up to the nearest multiple of significance. Negative numbers are rounded towards zero.

Syntax

expression.ECMA_CEILING(arg1, arg2);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe value to round up.
arg2RequiredApiRange | ApiName | numberThe multiple of significance to round up to.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.ECMA_CEILING(1.567, 0.1));