Table of Contents

Class ExcelConditionalFormattingRule

Namespace
OfficeOpenXml.ConditionalFormatting
Assembly
EPPlus.dll

Abstract base class for all ConditionalFormattingRules

public abstract class ExcelConditionalFormattingRule : IExcelConditionalFormattingRule
Inheritance
ExcelConditionalFormattingRule
Implements
Inherited Members

Constructors

ExcelConditionalFormattingRule(ExcelConditionalFormattingRule, ExcelWorksheet)

Copy constructor

protected ExcelConditionalFormattingRule(ExcelConditionalFormattingRule original, ExcelWorksheet newWorksheet = null)

Parameters

original ExcelConditionalFormattingRule
newWorksheet ExcelWorksheet

In case cloning from another worksheet

Properties

AboveAverage

Above average In Excel: Default:True, use=optional

protected bool? AboveAverage { get; }

Property Value

bool?

Address

The range over which these conditional formatting rules apply.

public virtual ExcelAddress Address { get; set; }

Property Value

ExcelAddress

As

Provides access to type conversion for all conditional formatting rules.

public ExcelConditionalFormattingAsType As { get; }

Property Value

ExcelConditionalFormattingAsType

Bottom

Bottom attribute

protected bool? Bottom { get; }

Property Value

bool?

EqualAverage

EqualAverage

protected bool? EqualAverage { get; }

Property Value

bool?

Formula

Formula

public virtual string Formula { get; set; }

Property Value

string

Formula2

Formula2 Note, no longer Requires Formula to be set before it. But will still throw error if both formulas not filled at save time.

public virtual string Formula2 { get; set; }

Property Value

string

Operator

Operator

protected eExcelConditionalFormattingOperatorType? Operator { get; set; }

Property Value

eExcelConditionalFormattingOperatorType?

Percent

Percent attribute

protected bool? Percent { get; }

Property Value

bool?

PivotTable

Indicates that the conditional formatting is associated with a PivotTable

public bool PivotTable { get; set; }

Property Value

bool

Priority

The priority of the rule. 1 is highest priority. 2 second highest etc.

public int Priority { get; set; }

Property Value

int

Rank

Rank (zero is not allowed and will be converted to 1)

public ushort Rank { get; set; }

Property Value

ushort

StdDev

0 is not allowed and will be converted to 1

public ushort StdDev { get; set; }

Property Value

ushort

StopIfTrue

If this property is true, no rules with lower priority should be applied over this rule.

public bool StopIfTrue { get; set; }

Property Value

bool

Style

The style

public ExcelDxfStyleConditionalFormatting Style { get; }

Property Value

ExcelDxfStyleConditionalFormatting

TimePeriod

TimePeriod

protected eExcelConditionalFormattingTimePeriodType? TimePeriod { get; set; }

Property Value

eExcelConditionalFormattingTimePeriodType?

Type

The type of conditional formatting rule.

public eExcelConditionalFormattingRuleType Type { get; set; }

Property Value

eExcelConditionalFormattingRuleType