add_condition方法
add_condition(type)
添加格式条件。
返回
格式化条件对象索引;
def add_condition(self, type):
...
| 范围 | 类型 | 描述 |
|---|---|---|
| type | FormatConditionType | 格式条件类型。 |
add_condition(type, operator_type, formula1, formula2)
添加格式化条件。
返回
格式化条件对象索引;
def add_condition(self, type, operator_type, formula1, formula2):
...
| 范围 | 类型 | 描述 |
|---|---|---|
| type | FormatConditionType | FormatConditionType 条件格式。
它可以是 FormatConditionType 的成员之一。 |
| operator_type | OperatorType | 比较 OperatorType。
它可以是 OperatorType 的成员之一。 |
| formula1 | str | 与条件格式关联的值或表达式。
如果输入值以’=‘开头,则将其作为公式。 否则它将被视为纯值(文本、数字、布尔值)。 对于以’=‘开头的文本值,用户可以将其作为公式输入,格式为:"="=…""。 |
| formula2 | str | 与条件格式关联的值或表达式。
输入格式同公式1 |