跳到主要内容

POWER

Returns the result of a number raised to a power.

Syntax

expression.POWER(arg1, arg2);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe base number. It can be any real number.
arg2RequiredApiRange | ApiName | numberThe exponent to which the base number is raised.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.POWER(23, 4));