Click or drag to resize

ConditionalFormatRuleCollectionAddUniqueOrDuplicate Method

Adds a 'Unique or Duplicate' 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: 43.0.35.1049
Syntax
public UniqueOrDuplicateCondition AddUniqueOrDuplicate(
	string appliesTo,
	bool duplicate
)

Parameters

appliesTo
Type: SystemString
The sequence of references to cell ranges over which the newly added conditional formatting rule is applied.
duplicate
Type: SystemBoolean
if set to format cells with duplicate values; otherwise, format cells with unique values.

Return Value

Type: UniqueOrDuplicateCondition
A UniqueOrDuplicateCondition set to a newly created conditional formatting rule which can be used to customize the formatting.
Exceptions
ExceptionCondition
ArgumentExceptionParameter appliesTo is or Empty.
Remarks
Newly added rule is inserted at the beginning of the collection so it has the highest priority and is first applied.
See Also