跳到主要内容

QUOTIENT

返回除法的整数部分。

语法

expression.QUOTIENT(arg1, arg2);

expression - 表示 ApiWorksheetFunction 类的变量。

参数

名称必需/可选数据类型默认值描述
arg1必需ApiRange | ApiName | number被除数,一个数值。
arg2必需ApiRange | ApiName | number除数,一个数值。

返回值

number

示例

获取电子表格中一个值除以另一个值的整数结果。

// How do I find the integer portion of a division in a spreadsheet?

// Extract the quotient without the remainder from two numbers in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.QUOTIENT(1698, 30));