Click or drag to resize

ConditionalFormatRuleCollectionAddContainText Method

Adds a 'Cells with Specific Text' conditional formatting rule applied to a specified sequence of references to cell ranges.

Namespace:  GemBox.Spreadsheet.ConditionalFormatting
Assembly:  GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 41.3.30.1147
Syntax
public ContainTextCondition AddContainText(
	string appliesTo,
	ContainTextOperator operator,
	string value
)

Parameters

appliesTo
Type: SystemString
The sequence of references to cell ranges over which the newly added conditional formatting rule is applied.
operator
Type: GemBox.Spreadsheet.ConditionalFormattingContainTextOperator
The textual operator.
value
Type: SystemString
The value (constant string or formula).

Return Value

Type: ContainTextCondition
A ContainTextCondition set to a newly created conditional formatting rule which can be used to customize the formatting.
Exceptions
ExceptionCondition
ArgumentExceptionParameter appliesTo is or Empty.
ArgumentNullExceptionParameter value is .
Remarks

Newly added rule is inserted at the beginning of the collection so it has the highest priority and is first applied.

Value can be either constant or formula.

If value is constant, then it cannot be .

If value is formula, it must start with '='.

See Also