add_condition method

add_condition(self, type)

Add a format condition.

Returns

Formatting condition object index;


def add_condition(self, type):
    ...
ParameterTypeDescription
typeaspose.cells.FormatConditionTypeFormat condition type.

add_condition(self, type, operator_type, formula1, formula2)

Adds a formatting condition.

Returns

Formatting condition object index;


def add_condition(self, type, operator_type, formula1, formula2):
    ...
ParameterTypeDescription
typeaspose.cells.FormatConditionTypeThe type of format condition.
operator_typeaspose.cells.OperatorTypeThe operator type
formula1System.StringThe value or expression associated with conditional formatting.
If the input value starts with ‘=’, then it will be taken as formula.
Otherwise it will be taken as plain value(text, number, bool).
For text value that starts with ‘=’, user may input it as formula in format: “="=…"”.
formula2System.StringThe value or expression associated with conditional formatting.
The input format is same with formula1

See Also