Table of Contents

Class XlsConditionalFormats

Namespace
Spire.Xls.Core.Spreadsheet.Collections
Assembly
Spire.XLS.dll
public class XlsConditionalFormats : CollectionExtended<IConditionalFormat>, IList<IConditionalFormat>, ICollection<IConditionalFormat>, IEnumerable<IConditionalFormat>, ICloneParent, IConditionalFormats, IEnumerable, IExcelApplication
Inheritance
XlsConditionalFormats
Implements
Inherited Members

Fields

MAXIMUM_CF_NUMBER

public const int MAXIMUM_CF_NUMBER = 3

Field Value

int

Properties

Address

public string Address { get; }

Property Value

string

AddressR1C1

public string AddressR1C1 { get; }

Property Value

string

Capacity

public int Capacity { get; set; }

Property Value

int

CellRectangles

public List<Rectangle> CellRectangles { get; }

Property Value

List<Rectangle>

Count

public int Count { get; }

Property Value

int

IsEmpty

public bool IsEmpty { get; }

Property Value

bool

this[int]

public IConditionalFormat this[int fieldIndex] { get; }

Parameters

fieldIndex int

Property Value

IConditionalFormat

Methods

AddAverageCondition(AverageType)

Add new above or below the average condition to the collection.

public IConditionalFormat AddAverageCondition(AverageType averageType)

Parameters

averageType AverageType

type of the average

Returns

IConditionalFormat

AddBeginsWithCondition(string)

Add new begin with condition to the collection.

public IConditionalFormat AddBeginsWithCondition(string text)

Parameters

text string

begin with text

Returns

IConditionalFormat

AddCellValueCondition(ComparisonOperatorType, double, double)

Add new cell value condition to the collection.

public IConditionalFormat AddCellValueCondition(ComparisonOperatorType operatorType, double value1, double value2)

Parameters

operatorType ComparisonOperatorType

The Comparison operator for conditional formatting in Excel.

value1 double

The first value

value2 double

The second value.If the operatorTypy is Equal or NotEqual or Greater or Less or GreaterOrEqual or LessOrEqual, then this parameter must use double.NaN.Don't use null

Returns

IConditionalFormat

AddCellValueCondition(ComparisonOperatorType, string, string)

Add new cell value condition to the collection.

public IConditionalFormat AddCellValueCondition(ComparisonOperatorType operatorType, string value1, string value2)

Parameters

operatorType ComparisonOperatorType

The Comparison operator for conditional formatting in Excel.

value1 string

The first value

value2 string

The second value .If the operatorTypy is Equal or NotEqual or Greater or Less or GreaterOrEqual or LessOrEqual, then this parameter must use string.Empty or null

Returns

IConditionalFormat

AddCells(XlsConditionalFormats)

public void AddCells(XlsConditionalFormats formats)

Parameters

formats XlsConditionalFormats

AddCells(IList)

public void AddCells(IList arrCells)

Parameters

arrCells IList

AddCondition()

public IConditionalFormat AddCondition()

Returns

IConditionalFormat

AddContainsBlanksCondition()

Add new contain blanks condition to the collection.

public IConditionalFormat AddContainsBlanksCondition()

Returns

IConditionalFormat

AddContainsErrorsCondition()

Add new contain errors condition to the collection.

public IConditionalFormat AddContainsErrorsCondition()

Returns

IConditionalFormat

AddContainsTextCondition(string)

Add new contain condition to the collection.

public IConditionalFormat AddContainsTextCondition(string text)

Parameters

text string

contain text

Returns

IConditionalFormat

AddDuplicateValuesCondition()

Add new duplicate values condition to the collection.

public IConditionalFormat AddDuplicateValuesCondition()

Returns

IConditionalFormat

AddEndsWithCondition(string)

Add new end with condition to the collection.

public IConditionalFormat AddEndsWithCondition(string text)

Parameters

text string

end with text

Returns

IConditionalFormat

AddNotContainsBlanksCondition()

Add new not contain blanks condition to the collection.

public IConditionalFormat AddNotContainsBlanksCondition()

Returns

IConditionalFormat

AddNotContainsErrorsCondition()

Add new not contain errors condition to the collection.

public IConditionalFormat AddNotContainsErrorsCondition()

Returns

IConditionalFormat

AddNotContainsTextCondition(string)

Add new not contain condition to the collection.

public IConditionalFormat AddNotContainsTextCondition(string text)

Parameters

text string

not contain text

Returns

IConditionalFormat

AddRange(IXLSRange)

public void AddRange(IXLSRange range)

Parameters

range IXLSRange

AddTimePeriodCondition(TimePeriodType)

Add new time period condition to the collection.

public IConditionalFormat AddTimePeriodCondition(TimePeriodType timePeriodType)

Parameters

timePeriodType TimePeriodType

type of the time period

Returns

IConditionalFormat

AddTopBottomCondition(TopBottomType, int)

Add new TopN or BottomN condition to the collection.

public IConditionalFormat AddTopBottomCondition(TopBottomType topBottomType, int rank)

Parameters

topBottomType TopBottomType
rank int

rank of the Top or Bottom

Returns

IConditionalFormat

AddUniqueValuesCondition()

Add new unique values condition to the collection.

public IConditionalFormat AddUniqueValuesCondition()

Returns

IConditionalFormat

BeginUpdate()

[Obsolete("the method is not implemented")]
public void BeginUpdate()

Clear()

public void Clear()

ClearCells()

public void ClearCells()

Clone(object)

public override object Clone(object parent)

Parameters

parent object

Returns

object

CompareFormats(IConditionalFormat, IConditionalFormat)

[Obsolete("the method is not implemented")]
public bool CompareFormats(IConditionalFormat firstFormat, IConditionalFormat secondFormat)

Parameters

firstFormat IConditionalFormat
secondFormat IConditionalFormat

Returns

bool

CompareTo(XlsConditionalFormats)

public bool CompareTo(XlsConditionalFormats formats)

Parameters

formats XlsConditionalFormats

Returns

bool

Contains(Rectangle[])

public bool Contains(Rectangle[] arrRanges)

Parameters

arrRanges Rectangle[]

Returns

bool

ContainsCount(Rectangle)

public int ContainsCount(Rectangle range)

Parameters

range Rectangle

Returns

int

EndUpdate()

[Obsolete("the method is not implemented")]
public void EndUpdate()

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetByIndex(int)

public IConditionalFormat GetByIndex(int index)

Parameters

index int

Returns

IConditionalFormat

GetEnumerator()

public IEnumerator GetEnumerator()

Returns

IEnumerator

GetHashCode()

public override int GetHashCode()

Returns

int

Remove(Rectangle[])

public void Remove(Rectangle[] arrRanges)

Parameters

arrRanges Rectangle[]

Remove(int, int, int, int)

public void Remove(int startRow, int startColumn, int totalRows, int totalColumns)

Parameters

startRow int
startColumn int
totalRows int
totalColumns int

RemoveAt(int)

public void RemoveAt(int index)

Parameters

index int