跳到主要内容

ARABIC

将罗马数字转换为阿拉伯数字。

语法​

expression.ARABIC(arg1);

expression - 表示 ApiWorksheetFunction 类的变量。

参数​

名称必需/可选数据类型默认值描述
arg1必需ApiRange | ApiName | string要转换的罗马数字。

返回值​

number

示例​

在电子表格中将罗马数字转换为常规数字。

// Transform text Roman numerals using the ARABIC function in a spreadsheet.

// Place the converted number into a cell for calculations in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.ARABIC("MCCL"));