跳到主要内容

SERIESSUM

基于公式返回幂级数的和。

语法

expression.SERIESSUM(arg1, arg2, arg3, arg4);

expression - 表示 ApiWorksheetFunction 类的变量。

参数

名称必需/可选数据类型默认值描述
arg1必需ApiRange | ApiName | number幂级数的输入值。
arg2必需ApiRange | ApiName | numberx 将被提升到的初始幂次。
arg3必需ApiRange | ApiName | number级数中每项 n 增加的步长。
arg4必需ApiRange | ApiName | numberx 的每个连续幂次所乘以的一组系数。

返回值

number

示例

此示例演示如何根据公式返回幂级数的和。

// How to calculate the sum of a power series.

// Use a function to sum up a power series using a formula.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.SERIESSUM(5, 2, 1, 3));