Enum BooleanCriteria
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
布林值條件
代表布林值條件的列舉,可用於條件式或篩選器。
如要呼叫列舉,請呼叫其父項類別、名稱和屬性。例如
SpreadsheetApp.BooleanCriteria.CELL_EMPTY
。
屬性
屬性 | 類型 | 說明 |
CELL_EMPTY | Enum | 儲存格為空白時,就符合條件。 |
CELL_NOT_EMPTY | Enum | 儲存格不為空白時,就符合條件。 |
DATE_AFTER | Enum | 當日期晚於指定值時,就符合條件。 |
DATE_BEFORE | Enum | 當日期早於指定值時,就符合條件。 |
DATE_EQUAL_TO | Enum | 當日期等於指定值時,就符合條件。 |
DATE_NOT_EQUAL_TO | Enum | 當日期不等於指定值時,就符合條件。 |
DATE_AFTER_RELATIVE | Enum | 當日期晚於相對日期值時,就符合條件。 |
DATE_BEFORE_RELATIVE | Enum | 當日期早於相對日期值時,就符合此條件。 |
DATE_EQUAL_TO_RELATIVE | Enum | 當日期等於相對日期值時,就符合條件。 |
NUMBER_BETWEEN | Enum | 當數字介於指定值之間時,就符合條件。 |
NUMBER_EQUAL_TO | Enum | 當數字等於指定值時,就符合條件。 |
NUMBER_GREATER_THAN | Enum | 當數字大於指定值時,就符合條件。 |
NUMBER_GREATER_THAN_OR_EQUAL_TO | Enum | 當數字大於或等於指定值時,就符合條件。 |
NUMBER_LESS_THAN | Enum | 當數字小於指定值時,就會符合條件。 |
NUMBER_LESS_THAN_OR_EQUAL_TO | Enum | 當數字小於或等於指定值時,就會符合條件。 |
NUMBER_NOT_BETWEEN | Enum | 如果數字不在指定值之間,就符合條件。 |
NUMBER_NOT_EQUAL_TO | Enum | 當數字不等於指定值時,就符合條件。 |
TEXT_CONTAINS | Enum | 只要輸入內容包含指定值,就符合條件。 |
TEXT_DOES_NOT_CONTAIN | Enum | 如果輸入內容不含指定值,就會符合條件。 |
TEXT_EQUAL_TO | Enum | 當輸入值等於指定值時,就符合條件。 |
TEXT_NOT_EQUAL_TO | Enum | 如果輸入值不等於指定值,就符合條件。 |
TEXT_STARTS_WITH | Enum | 輸入內容開頭為指定值時,就符合條件。 |
TEXT_ENDS_WITH | Enum | 只要輸入內容結尾為指定值,就符合條件。 |
CUSTOM_FORMULA | Enum | 如果輸入內容會導致指定公式評估為 true ,就符合條件。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003e\u003ccode\u003eBooleanCriteria\u003c/code\u003e is an enumeration used to define criteria for conditional formatting or filtering in Google Sheets.\u003c/p\u003e\n"],["\u003cp\u003eIt provides a variety of properties representing different criteria types like \u003ccode\u003eCELL_EMPTY\u003c/code\u003e, \u003ccode\u003eDATE_EQUAL_TO\u003c/code\u003e, \u003ccode\u003eNUMBER_GREATER_THAN\u003c/code\u003e, \u003ccode\u003eTEXT_CONTAINS\u003c/code\u003e, and more.\u003c/p\u003e\n"],["\u003cp\u003eTo use a specific criteria, you call it using the syntax \u003ccode\u003eSpreadsheetApp.BooleanCriteria.<property>\u003c/code\u003e, for example, \u003ccode\u003eSpreadsheetApp.BooleanCriteria.CELL_EMPTY\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eEach property represents a specific condition, such as whether a cell is empty, a date is within a certain range, or text contains a specific string.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBooleanCriteria\u003c/code\u003e helps automate tasks and enhance data analysis by enabling you to dynamically format or filter spreadsheet data based on specified conditions.\u003c/p\u003e\n"]]],[],null,["# Enum BooleanCriteria\n\nBooleanCriteria\n\nAn enumeration representing the boolean criteria that can be used in conditional format or\nfilter.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nSpreadsheetApp.BooleanCriteria.CELL_EMPTY`. \n\n### Properties\n\n| Property | Type | Description |\n|-----------------------------------|--------|-------------------------------------------------------------------------------------|\n| `CELL_EMPTY` | `Enum` | The criteria is met when a cell is empty. |\n| `CELL_NOT_EMPTY` | `Enum` | The criteria is met when a cell is not empty. |\n| `DATE_AFTER` | `Enum` | The criteria is met when a date is after the given value. |\n| `DATE_BEFORE` | `Enum` | The criteria is met when a date is before the given value. |\n| `DATE_EQUAL_TO` | `Enum` | The criteria is met when a date is equal to the given value. |\n| `DATE_NOT_EQUAL_TO` | `Enum` | The criteria is met when a date is not equal to the given value. |\n| `DATE_AFTER_RELATIVE` | `Enum` | The criteria is met when a date is after the relative date value. |\n| `DATE_BEFORE_RELATIVE` | `Enum` | The criteria is met when a date is before the relative date value. |\n| `DATE_EQUAL_TO_RELATIVE` | `Enum` | The criteria is met when a date is equal to the relative date value. |\n| `NUMBER_BETWEEN` | `Enum` | The criteria is met when a number that is between the given values. |\n| `NUMBER_EQUAL_TO` | `Enum` | The criteria is met when a number that is equal to the given value. |\n| `NUMBER_GREATER_THAN` | `Enum` | The criteria is met when a number that is greater than the given value. |\n| `NUMBER_GREATER_THAN_OR_EQUAL_TO` | `Enum` | The criteria is met when a number that is greater than or equal to the given value. |\n| `NUMBER_LESS_THAN` | `Enum` | The criteria is met when a number that is less than the given value. |\n| `NUMBER_LESS_THAN_OR_EQUAL_TO` | `Enum` | The criteria is met when a number that is less than or equal to the given value. |\n| `NUMBER_NOT_BETWEEN` | `Enum` | The criteria is met when a number that is not between the given values. |\n| `NUMBER_NOT_EQUAL_TO` | `Enum` | The criteria is met when a number that is not equal to the given value. |\n| `TEXT_CONTAINS` | `Enum` | The criteria is met when the input contains the given value. |\n| `TEXT_DOES_NOT_CONTAIN` | `Enum` | The criteria is met when the input does not contain the given value. |\n| `TEXT_EQUAL_TO` | `Enum` | The criteria is met when the input is equal to the given value. |\n| `TEXT_NOT_EQUAL_TO` | `Enum` | The criteria is met when the input is not equal to the given value. |\n| `TEXT_STARTS_WITH` | `Enum` | The criteria is met when the input begins with the given value. |\n| `TEXT_ENDS_WITH` | `Enum` | The criteria is met when the input ends with the given value. |\n| `CUSTOM_FORMULA` | `Enum` | The criteria is met when the input makes the given formula evaluate to `true`. |"]]