跳到主要内容

ISERROR

Checks whether a value is an error, and returns -true or -false.

Syntax

expression.ISERROR(arg1);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1Requirednumber | string | boolean | ApiRange | ApiNameThe value to test.\ The value can be an empty cell, error, logical value, text, number, range, or range name.

Returns

boolean

Example

const worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("B3").SetValue("#N/A")
let result = func.ISERR("B3");
worksheet.GetRange("C3").SetValue(result)