Click or drag to resize

ConditionalFormatRuleCollectionAddTopOrBottomRanked Method

Adds a 'Top or Bottom Ranked' 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.1020
Syntax
public TopOrBottomRankedCondition AddTopOrBottomRanked(
	string appliesTo,
	bool bottom,
	int rank
)

Parameters

appliesTo
Type: SystemString
The sequence of references to cell ranges over which the newly added conditional formatting rule is applied.
bottom
Type: SystemBoolean
if set to format cells with bottom ranked values; otherwise, format cells with top ranked values.
rank
Type: SystemInt32
The number of top or bottom ranked cells which are formatted.

Return Value

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