跳到主要内容

UNICHAR

返回由给定数值引用的 Unicode 字符。

语法

expression.UNICHAR(arg1);

expression - 表示 ApiWorksheetFunction 类的变量。

参数

名称必需/可选数据类型默认值描述
arg1必需ApiRange | ApiName | number表示字符的 Unicode 编号。

返回值

string

示例

在电子表格中返回由给定数值引用的 Unicode 字符。

// The UNICHAR function converts numeric code points to their corresponding characters.

// Apply the function to obtain a character from its Unicode number in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.UNICHAR(378));