跳到主要内容

DOLLARDE

将以分数表示的美元价格转换为以小数表示的美元价格。

语法

expression.DOLLARDE(arg1, arg2);

expression - 表示 ApiWorksheetFunction 类的变量。

参数

名称必需/可选数据类型默认值描述
arg1必需ApiRange | ApiName | number以分数形式表示的数字。
arg2必需ApiRange | ApiName | number用于分数分母的整数。

返回值

number

示例

将分数美元价格转换为其十进制等值。

// Transform prices from fractional notation to decimal notation.

// Use the DOLLARDE function to convert fractional prices to decimal format.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.DOLLARDE(1.03, 16));