跳到主要内容

TBILLPRICE

返回国库券每 $100 面值的价格。

语法

expression.TBILLPRICE(arg1, arg2, arg3);

expression - 表示 ApiWorksheetFunction 类的变量。

参数

名称必需/可选数据类型默认值描述
arg1必需ApiRange | ApiName | number国库券的结算日期,以序列日期数字表示。
arg2必需ApiRange | ApiName | number国库券的到期日,以序列日期数字表示。
arg3必需ApiRange | ApiName | number国库券的贴现率。

返回值

number

示例

此示例演示如何返回国库券的每 100 美元面值价格。

// How to return the price per $100 face value for a Treasury bill.

// Use a function to calculate the price per $100 face value.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.TBILLPRICE("1/1/2018", "1/1/2019", "3.00%"));