Skip to content

Class ExcelConditionalFormattingAsType

Namespace: OfficeOpenXml.ConditionalFormatting
Assembly: EPPlus.dll

Provides a simple way to type cast a conditional formatting object to its top level class.

public class ExcelConditionalFormattingAsType

Inheritance

object ← ExcelConditionalFormattingAsType

Inherited Members

object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Properties

Average

Returns the conditional formatting object as an Average rule If this object is not of type AboveAverage, AboveOrEqualAverage, BelowAverage or BelowOrEqualAverage, null will be returned

public IExcelConditionalFormattingAverageGroup Average { get; }

Property Value

IExcelConditionalFormattingAverageGroup

BeginsWith

Returns the conditional formatting object as a BeginsWith rule If this object is not of type BeginsWith, null will be returned

public IExcelConditionalFormattingBeginsWith BeginsWith { get; }

Property Value

IExcelConditionalFormattingBeginsWith

Between

Returns the conditional formatting object as a Between rule If this object is not of type Between, null will be returned

public IExcelConditionalFormattingBetween Between { get; }

Property Value

IExcelConditionalFormattingBetween

ContainsBlanks

Returns the conditional formatting object as a ContainsBlanks rule If this object is not of type ContainsBlanks, null will be returned

public IExcelConditionalFormattingContainsBlanks ContainsBlanks { get; }

Property Value

IExcelConditionalFormattingContainsBlanks

ContainsErrors

Returns the conditional formatting object as a ContainsErrors rule If this object is not of type ContainsErrors, null will be returned

public IExcelConditionalFormattingContainsErrors ContainsErrors { get; }

Property Value

IExcelConditionalFormattingContainsErrors

ContainsText

Returns the conditional formatting object as a ContainsText rule If this object is not of type ContainsText, null will be returned

public IExcelConditionalFormattingContainsText ContainsText { get; }

Property Value

IExcelConditionalFormattingContainsText

DataBar

Returns the conditional formatting object as a DataBar rule If this object is not of type DataBar, null will be returned

public IExcelConditionalFormattingDataBarGroup DataBar { get; }

Property Value

IExcelConditionalFormattingDataBarGroup

DateTimePeriod

Returns the conditional formatting object as a DateTimePeriod rule If this object is not of type Last7Days, LastMonth, LastWeek, NextMonth, NextWeek, ThisMonth, ThisWeek, Today, Tomorrow or Yesterday, null will be returned

public IExcelConditionalFormattingTimePeriodGroup DateTimePeriod { get; }

Property Value

IExcelConditionalFormattingTimePeriodGroup

DuplicateValues

Returns the conditional formatting object as a DuplicateValues rule If this object is not of type DuplicateValues, null will be returned

public IExcelConditionalFormattingDuplicateValues DuplicateValues { get; }

Property Value

IExcelConditionalFormattingDuplicateValues

EndsWith

Returns the conditional formatting object as an EndsWith rule If this object is not of type EndsWith, null will be returned

public IExcelConditionalFormattingEndsWith EndsWith { get; }

Property Value

IExcelConditionalFormattingEndsWith

Equal

Returns the conditional formatting object as an Equal rule If this object is not of type Equal, null will be returned

public IExcelConditionalFormattingEqual Equal { get; }

Property Value

IExcelConditionalFormattingEqual

Expression

Returns the conditional formatting object as an Expression rule If this object is not of type Expression, null will be returned

public IExcelConditionalFormattingExpression Expression { get; }

Property Value

IExcelConditionalFormattingExpression

FiveIconSet

Returns the conditional formatting object as a FiveIconSet rule If this object is not of type FiveIconSet, null will be returned

public IExcelConditionalFormattingFiveIconSet FiveIconSet { get; }

Property Value

IExcelConditionalFormattingFiveIconSet

FourIconSet

Returns the conditional formatting object as a FourIconSet rule If this object is not of type FourIconSet, null will be returned

public IExcelConditionalFormattingFourIconSet<eExcelconditionalFormatting4IconsSetType> FourIconSet { get; }

Property Value

IExcelConditionalFormattingFourIconSet<eExcelconditionalFormatting4IconsSetType>

GreaterThan

Returns the conditional formatting object as a GreaterThan rule If this object is not of type GreaterThan, null will be returned

public IExcelConditionalFormattingGreaterThan GreaterThan { get; }

Property Value

IExcelConditionalFormattingGreaterThan

GreaterThanOrEqual

Returns the conditional formatting object as a GreaterThanOrEqual rule If this object is not of type GreaterThanOrEqual, null will be returned

public IExcelConditionalFormattingGreaterThanOrEqual GreaterThanOrEqual { get; }

Property Value

IExcelConditionalFormattingGreaterThanOrEqual

LessThan

Returns the conditional formatting object as a LessThan rule If this object is not of type LessThan, null will be returned

public IExcelConditionalFormattingLessThan LessThan { get; }

Property Value

IExcelConditionalFormattingLessThan

LessThanOrEqual

Returns the conditional formatting object as a LessThanOrEqual rule If this object is not of type LessThanOrEqual, null will be returned

public IExcelConditionalFormattingLessThanOrEqual LessThanOrEqual { get; }

Property Value

IExcelConditionalFormattingLessThanOrEqual

NotBetween

Returns the conditional formatting object as a NotBetween rule If this object is not of type NotBetween, null will be returned

public IExcelConditionalFormattingNotBetween NotBetween { get; }

Property Value

IExcelConditionalFormattingNotBetween

NotContainsBlanks

Returns the conditional formatting object as a NotContainsBlanks rule If this object is not of type NotContainsBlanks, null will be returned

public IExcelConditionalFormattingNotContainsBlanks NotContainsBlanks { get; }

Property Value

IExcelConditionalFormattingNotContainsBlanks

NotContainsErrors

Returns the conditional formatting object as a NotContainsErrors rule If this object is not of type NotContainsErrors, null will be returned

public IExcelConditionalFormattingNotContainsErrors NotContainsErrors { get; }

Property Value

IExcelConditionalFormattingNotContainsErrors

NotContainsText

Returns the conditional formatting object as a NotContainsText rule If this object is not of type NotContainsText, null will be returned

public IExcelConditionalFormattingNotContainsText NotContainsText { get; }

Property Value

IExcelConditionalFormattingNotContainsText

NotEqual

Returns the conditional formatting object as a NotEqual rule If this object is not of type NotEqual, null will be returned

public IExcelConditionalFormattingNotEqual NotEqual { get; }

Property Value

IExcelConditionalFormattingNotEqual

StdDev

Returns the conditional formatting object as a StdDev rule If this object is not of type AboveStdDev or BelowStdDev, null will be returned

public IExcelConditionalFormattingStdDevGroup StdDev { get; }

Property Value

IExcelConditionalFormattingStdDevGroup

ThreeColorScale

Returns the conditional formatting object as a ThreeColorScale rule If this object is not of type ThreeColorScale, null will be returned

public IExcelConditionalFormattingThreeColorScale ThreeColorScale { get; }

Property Value

IExcelConditionalFormattingThreeColorScale

ThreeIconSet

Returns the conditional formatting object as a ThreeIconSet rule If this object is not of type ThreeIconSet, null will be returned

public IExcelConditionalFormattingThreeIconSet<eExcelconditionalFormatting3IconsSetType> ThreeIconSet { get; }

Property Value

IExcelConditionalFormattingThreeIconSet<eExcelconditionalFormatting3IconsSetType>

TopBottom

Returns the conditional formatting object as a TopBottom rule If this object is not of type Bottom, BottomPercent, Top or TopPercent, null will be returned

public IExcelConditionalFormattingTopBottomGroup TopBottom { get; }

Property Value

IExcelConditionalFormattingTopBottomGroup

TwoColorScale

Returns the conditional formatting object as a TwoColorScale rule If this object is not of type TwoColorScale, null will be returned

public IExcelConditionalFormattingTwoColorScale TwoColorScale { get; }

Property Value

IExcelConditionalFormattingTwoColorScale

UniqueValues

Returns the conditional formatting object as a UniqueValues rule If this object is not of type UniqueValues, null will be returned

public IExcelConditionalFormattingUniqueValues UniqueValues { get; }

Property Value

IExcelConditionalFormattingUniqueValues

Methods

Type<T>()

Converts the conditional formatting object to it's top level or another nested class.

public T Type<T>() where T : IExcelConditionalFormattingRule

Returns

T

The conditional formatting rule as type T

Type Parameters

T

The type of conditional formatting object. T must be inherited from IExcelConditionalFormattingRule