Collection class for objects which derive from [[ConditionBase]].

ConditionalFormatCollection

new ConditionalFormatCollection(a: Worksheet): ConditionalFormatCollection

Returns ConditionalFormatCollection

$t: Type

Returns the total number of items in the collection.

get count(): number

Returns number

Adds a new [[AverageConditionalFormat]] instance to this collection.

addAverageCondition(regionAddress: string, aboveBelow: FormatConditionAboveBelow): AverageConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

  • aboveBelow: FormatConditionAboveBelow

    A [[FormatConditionAboveBelow]] value which defines the initial value of the [[AverageConditionalFormat.aboveBelow]] property. This parameter is optional and defaults to AboveAverage.

Returns AverageConditionalFormat

Adds a new [[BlanksConditionalFormat]] instance to this collection.

addBlanksCondition(regionAddress: string): BlanksConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

Returns BlanksConditionalFormat

Adds a new [[ColorScaleConditionalFormat]] instance to this collection.

addColorScaleCondition(regionAddress: string, colorScaleType: ColorScaleType): ColorScaleConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

  • colorScaleType: ColorScaleType

    A [[ColorScaleType]] value which determines whether to add a 2-color or 3-color scale.

Returns ColorScaleConditionalFormat

Adds a new [[DataBarConditionalFormat]] instance to this collection.

addDataBarCondition(regionAddress: string): DataBarConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

Returns DataBarConditionalFormat

Adds a new [[DateTimeConditionalFormat]] instance to this collection.

addDateTimeCondition(regionAddress: string, dateOperator: FormatConditionTimePeriod): DateTimeConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

  • dateOperator: FormatConditionTimePeriod

    A [[FormatConditionTimePeriod]] which defines the time period against which cell date values are evaluated. This parameter is optional and defaults to Today.

Returns DateTimeConditionalFormat

Adds a new [[DuplicateConditionalFormat]] instance to this collection, configured as a duplicate value condition.

addDuplicateCondition(regionAddress: string): DuplicateConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

Returns DuplicateConditionalFormat

Adds a new [[ErrorsConditionalFormat]] instance to this collection.

addErrorsCondition(regionAddress: string): ErrorsConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

Returns ErrorsConditionalFormat

Adds a new [[FormulaConditionalFormat]] instance to this collection.

addFormulaCondition(regionAddress: string, formula: string, cellReferenceMode: CellReferenceMode): FormulaConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

  • formula: string

    The formula which is used to determine whether a cell value meets the condition criteria.

  • cellReferenceMode: CellReferenceMode

    A [[CellReferenceMode]] value which specifies whether the 'formula' parameter should be interpreted as an A1 or R1C1 expression. This parameter is optional and defaults to null, in which case the [[Workbook.cellReferenceMode]] property is used.

Returns FormulaConditionalFormat

Adds a new [[IconSetConditionalFormat]] instance to this collection.

addIconSetCondition(regionAddress: string, iconSet: FormatConditionIconSet): IconSetConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

  • iconSet: FormatConditionIconSet

    A [[FormatConditionIconSet]] value which identifies the icon set to use. This parameter is optional and defaults to IconSet3TrafficLights1.

Returns IconSetConditionalFormat

Adds a new [[NoBlanksConditionalFormat]] instance to this collection.

addNoBlanksCondition(regionAddress: string): NoBlanksConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

Returns NoBlanksConditionalFormat

Adds a new [[NoErrorsConditionalFormat]] instance to this collection.

addNoErrorsCondition(regionAddress: string): NoErrorsConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

Returns NoErrorsConditionalFormat

Adds a new [[OperatorConditionalFormat]] instance to this collection.

addOperatorCondition(regionAddress: string, conditionOperator: FormatConditionOperator): OperatorConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

  • conditionOperator: FormatConditionOperator

    A [[FormatConditionOperator]] value which defines the initial value of the [[OperatorConditionalFormat.operator]] property. This parameter is optional and defaults to Equal.

Returns OperatorConditionalFormat

Adds a new [[RankConditionalFormat]] instance to this collection.

addRankCondition(regionAddress: string, topBottom: FormatConditionTopBottom, rank: number): RankConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

  • topBottom: FormatConditionTopBottom

    A [[FormatConditionTopBottom]] value which determines whether the top or bottom of the ranking is evaluated. This parameter is optional and defaults to Top.

  • rank: number

    The numeric, percentage, or percentile ranking. This parameter is optional and defaults to 10.

Returns RankConditionalFormat

Adds a new [[TextOperatorConditionalFormat]] instance to this collection.

addTextCondition(regionAddress: string, text: string, textOperator: FormatConditionTextOperator): TextOperatorConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

  • text: string

    A string which determines the string against which cell text values are evaluated. This parameter is optional and defaults to null.

  • textOperator: FormatConditionTextOperator

    A [[FormatConditionTextOperator]] value which determines the manner in which cell values are compared to the 'text' value. This parameter is optional and defaults to BeginsWith.

Returns TextOperatorConditionalFormat

Adds a new [[UniqueConditionalFormat]] instance to this collection, configured as a unique value condition.

addUniqueCondition(regionAddress: string): UniqueConditionalFormat

Parameters

  • regionAddress: string

    A string identifying the region to which this conditional format applies.

Returns UniqueConditionalFormat

Removes all items from the collection.

clear(): void

Returns void

Returns true if the collection contains the condition

contains(condition: ConditionBase): boolean

Parameters

Returns boolean

getEnumerator(): any

Returns any

getEnumeratorObject(): any

Returns any

Gets the index of the item in the collection

indexOf(condition: ConditionBase): number

Parameters

Returns number

Indexer

item(a: number): ConditionBase

Parameters

  • a: number

Returns ConditionBase

Removes an item from the collection

remove(condition: ConditionBase): boolean

Parameters

Returns boolean

Removes an item from the collection at a specifoed index

removeAt(index: number): void

Parameters

  • index: number

    The zero based index in the collection

Returns void

staticInit(): void

Returns void