跳到主要内容

ISPMT

Returns the interest paid during a specific period of an investment.

Syntax

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

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR.
arg2RequiredApiRange | ApiName | numberThe period for which the interest will be retuned. It must be in the range from 1 to the total number of payments.
arg3RequiredApiRange | ApiName | numberThe total number of payment periods in an investment.
arg4RequiredApiRange | ApiName | numberThe present value, or the lump-sum amount that a series of future payments is worth now.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.ISPMT(0.1/12, 1, 2*12, 2000));