跳到主要内容

CHAR

返回计算机字符集中由代码数字指定的字符。

语法

expression.CHAR(arg1);

expression - 表示 ApiWorksheetFunction 类的变量。

参数

名称必需/可选数据类型默认值描述
arg1必需ApiRange | ApiName | number1 到 255 之间的数字,指定计算机字符集中的字符。

返回值

string

示例

在电子表格中将数字代码转换为其字符符号。

// What character does a number code represent in a spreadsheet?

// Display the letter or symbol matching a code value in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.CHAR(234));