Skip to main content

POWER

Returns the result of a number raised to a power.

Syntax​

expression.POWER(arg1, arg2);

expression - A variable that represents an 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​

Raise a number to a power in a spreadsheet.

// What is the result of raising a number to a power in a spreadsheet?

// Calculate an exponential value using a specific base and exponent in a spreadsheet.

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