FormatConditionCollection.AddCondition

AddCondition(FormatConditionType, OperatorType, string, string)

Adds a formatting condition.

public int AddCondition(FormatConditionType type, OperatorType operatorType, string formula1, 
    string formula2)
ParameterTypeDescription
typeFormatConditionTypeThe type of format condition.
operatorTypeOperatorTypeThe operator type
formula1StringThe 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: “="=…"”.
formula2StringThe value or expression associated with conditional formatting. The input format is same with formula1

Return Value

Formatting condition object index;

See Also


AddCondition(FormatConditionType)

Add a format condition.

public int AddCondition(FormatConditionType type)
ParameterTypeDescription
typeFormatConditionTypeFormat condition type.

Return Value

Formatting condition object index;

See Also