跳到主要内容

FLOOR

Rounds a number down to the nearest multiple of significance.

Syntax

expression.FLOOR(arg1, arg2);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe numeric value to round down.
arg2RequiredApiRange | ApiName | numberThe multiple of significance to round down to. The number to round down and the multiple of significance must have the same sign.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.FLOOR(5.786, 0.7));