跳到主要内容

IMPRODUCT

返回指定复数的乘积。

语法

expression.IMPRODUCT(args);

expression - 表示 ApiWorksheetFunction 类的变量。

参数

名称必需/可选数据类型默认值描述
args必需ApiRange | ApiName | string最多 255 个以 x + yix + yj 形式表示的复数。

返回值

number

示例

在电子表格中返回指定复数的乘积。

// How to get the result from multiplication of a complex number in a spreadsheet.

// Use a function to get the result from the product in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.IMPRODUCT("-2+2.5i", "0.1+1.5j", "1+3i"));