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