跳到主要内容

ISLOGICAL

Checks whether a value is a logical value (-true or -false), and returns -true or -false.

Syntax

expression.ISLOGICAL(arg1);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | string | number | boolean | 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();
worksheet.GetRange("B3").SetValue("66");

let func = Api.GetWorksheetFunction();
let result = func.ISLOGICAL(worksheet.GetRange("B3"));
worksheet.GetRange("C3").SetValue(result);