add方法

add(cell_area, type, operator_type, formula1, formula2)

将格式化条件和受影响的单元格范围添加到 FormatConditions FormatConditions 最多可以包含三种条件格式。 条件格式的公式中不允许引用其他工作表。

返回

[0]:格式化条件对象索引;[1] 影响单元格范围索引。

def add(self, cell_area, type, operator_type, formula1, formula2):
    ...
范围类型描述
cell_areaCellArea条件格式的单元格范围。
typeFormatConditionType条件格式的类型。它可以是 FormatConditionType 的成员之一。
operator_typeOperatorType比较运算符。它可以是 OperatorType 的成员之一。
formula1str与条件格式关联的值或表达式。
formula2str与条件格式关联的值或表达式

也可以看看