Class
SingleArgumentComparisonRule

Base class for conditional formatting rules that compare cell values against a single argument, supporting both absolute values and formula-based arguments.

Definition

Constructors

SingleArgumentComparisonRule(string)

Initializes a new SingleArgumentComparisonRule with the comparison argument.

Declaration

cs-api-definition
[Obsolete("This constructor is obsoleted, please use the one with formatting parameter instead.")]
protected SingleArgumentComparisonRule(string argument)

Parameters

argument

string

SingleArgumentComparisonRule(string, DifferentialFormatting)

Initializes a new SingleArgumentComparisonRule with the comparison argument and formatting to apply when the condition is met.

Declaration

cs-api-definition
protected SingleArgumentComparisonRule(string argument, DifferentialFormatting formatting)

Parameters

argument

string

formatting

DifferentialFormatting

Methods

Resolve(ICellValue)

Evaluates the comparison rule for numeric cell values and returns 1.0 if the condition is met, 0.0 otherwise.

Declaration

cs-api-definition
protected override double Resolve(ICellValue value)

Parameters

value

ICellValue

The cell value

Returns

double

Overrides ConditionalFormattingRule.Resolve(ICellValue)

ResolveComparables(IComparable, IComparable)

Evaluates the comparison between the cell value and argument value and returns 1.0 when the condition is satisfied, 0.0 otherwise.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Comparables")]
protected abstract double ResolveComparables(IComparable cellValue, IComparable value)

Parameters

cellValue

IComparable

value

IComparable

Returns

double

ResolveText(TextCellValue)

Evaluates the comparison rule for text cell values and returns 1.0 if the condition is met, 0.0 otherwise.

Declaration

cs-api-definition
protected virtual double ResolveText(TextCellValue cellValue)

Parameters

cellValue

TextCellValue

The cell value

Returns

double