跳到主要内容

NA

返回 #N/A 错误值,表示"无可用值"。

语法

expression.NA();

expression - 表示 ApiWorksheetFunction 类的变量。

参数

此方法没有任何参数。

返回值

string

示例

在电子表格中返回 N/A 错误值,表示"无可用值"。

// How to return the N/A in a spreadsheet.

// Use a function to get a N/A error value in a spreadsheet.

const worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
let result = func.NA();
worksheet.GetRange("C3").SetValue(result);