Click or drag to resize

ConditionalFormatRuleSetContainValue Method (ContainValueOperator, Object, Object)

Sets a 'Cells with Cell Value' formatting condition to this conditional formatting rule.

Namespace:  GemBox.Spreadsheet.ConditionalFormatting
Assembly:  GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 43.0.35.1020
Syntax
public ContainValueCondition SetContainValue(
	ContainValueOperator operator,
	Object value,
	Object value2
)

Parameters

operator
Type: GemBox.Spreadsheet.ConditionalFormattingContainValueOperator
The operator (Between or NotBetween).
value
Type: SystemObject
The value (constant or formula).
value2
Type: SystemObject
The second value (constant or formula).

Return Value

Type: ContainValueCondition
A ContainValueCondition set to this conditional formatting rule which can be used to customize the formatting.
Exceptions
ExceptionCondition
ArgumentExceptionParameter operator is not Between nor NotBetween. Use other method overload for other operators.
ArgumentNullExceptionParameter value or value2 is .
ArgumentExceptionParameter value or value2 type is not supported.
Remarks

Values can be either constant or formula.

If value is constant, then it cannot be and value's type must be supported in Value (types supported in SupportsType(Type)).

If value is formula, then value type must be String and it must start with '='.

See Also