FormatConditionCollectionAddCondition Method (FormatConditionType, OperatorType, String, String)

Adds a formatting condition.

Namespace:  Aspose.Cells
Assembly:  Aspose.Cells (in Aspose.Cells.dll) Version: 21.5.0.0 (21.5)
Syntax
public int AddCondition(
	FormatConditionType type,
	OperatorType operatorType,
	string formula1,
	string formula2
)

Parameters

type
Type: Aspose.CellsFormatConditionType
of conditional formatting. It could be one of the members of FormatConditionType.
operatorType
Type: Aspose.CellsOperatorType
The comparison OperatorType. It could be one of the members of OperatorType.
formula1
Type: SystemString
The 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: "=\"=...\"".
formula2
Type: SystemString
The value or expression associated with conditional formatting. The input format is same with formula1

Return Value

Type: Int32
Formatting condition object index;
See Also