跳到主要内容

TRUE

返回 true 逻辑值。

语法​

expression.TRUE();

expression - 表示 ApiWorksheetFunction 类的变量。

参数​

此方法没有任何参数。

返回值​

boolean

示例​

在电子表格中返回逻辑真值。

// How do I insert the logical true value into a cell in a spreadsheet?

// Set a cell to the boolean true value in a spreadsheet.

const worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
let ans = func.TRUE();
worksheet.GetRange("A1").SetValue(ans);