跳到主要内容

IMPOWER

Returns a complex number raised to an integer power.

Syntax

expression.IMPOWER(arg1, arg2);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberA complex number expressed in the <em>x + yi</em> or <em>x + yj</em> form.
arg2RequiredApiRange | ApiName | numberThe power to which the complex number will be raised.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.IMPOWER("-2+2.5i", -3));