Click or drag to resize

ConditionalFormatRuleCollectionAddContain Method

Adds a 'Cells with Blanks' or 'Cells with No Blanks' or 'Cells with Errors' or 'Cells with No Errors' 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:
public ContainCondition AddContain(
	string appliesTo,
	ContainConditionType containConditionType


Type: SystemString
The sequence of references to cell ranges over which the newly added conditional formatting rule is applied.
Type: GemBox.Spreadsheet.ConditionalFormattingContainConditionType
The contain condition type (Blanks or NoBlanks or Errors or NoErrors).

Return Value

Type: ContainCondition
A ContainCondition set to a newly created conditional formatting rule which can be used to customize the formatting.
ArgumentExceptionParameter appliesTo is or Empty.
ArgumentExceptionParameter containConditionType is not Blanks or NoBlanks or Errors or NoErrors.
Newly added rule is inserted at the beginning of the collection so it has the highest priority and is first applied.
See Also