A collection of [[DataValidationRule]] instances in a worksheet.

See

[[Worksheet.dataValidationRules]]

Hierarchy

Hierarchy

  • Base
    • DataValidationRuleCollection

Implements

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get count(): number
  • Gets the number of data validation rules applied on the [[worksheet]].

    Returns number

Methods

  • Applies an [[AnyValueDataValidationRule]] to a [[WorksheetCell]].

    Throws

    [[ArgumentNullException]] Occurs when 'rule' is null.

    Throws

    [[ArgumentNullException]] Occurs when 'cell' is null.

    Throws

    [[ArgumentException]] Occurs when the 'cell' is from a worksheet other than this collection.

    Throws

    [[ArgumentException]] Occurs when the 'rule' already applied to another worksheet.

    Throws

    [[ArgumentException]] Occurs when the 'rule' is invalid based on its rule type's requirements.

    Throws

    [[ArgumentException]] Occurs when the 'cell' already has a data validation rule applied to it.

    Throws

    [[ArgumentException]] Occurs when the 'cell' is a total cell of a table.

    See

    [[add]]

    Parameters

    Returns void

  • Applies an [[AnyValueDataValidationRule]] to the cells in a [[WorksheetRegion]].

    Throws

    [[ArgumentNullException]] Occurs when 'rule' is null.

    Throws

    [[ArgumentNullException]] Occurs when 'region' is null.

    Throws

    [[ArgumentException]] Occurs when the 'region' is from a worksheet other than this collection.

    Throws

    [[ArgumentException]] Occurs when the 'rule' already applied to another worksheet.

    Throws

    [[ArgumentException]] Occurs when the 'rule' is invalid based on its rule type's requirements.

    Throws

    [[ArgumentException]] Occurs when the one or more of the cells in the 'region' already have a data validation rule applied to it.

    Throws

    [[ArgumentException]] Occurs when the one or more of the cells in the 'region' is a total cell of a table.

    See

    [[add]]

    Parameters

    Returns void

  • Applies an [[CustomDataValidationRule]] to a [[WorksheetCell]].

    Throws

    [[ArgumentNullException]] Occurs when 'rule' is null.

    Throws

    [[ArgumentNullException]] Occurs when 'cell' is null.

    Throws

    [[ArgumentException]] Occurs when the 'cell' is from a worksheet other than this collection.

    Throws

    [[ArgumentException]] Occurs when the 'rule' already applied to another worksheet.

    Throws

    [[ArgumentException]] Occurs when the 'rule' is invalid based on its rule type's requirements.

    Throws

    [[ArgumentException]] Occurs when the 'cell' already has a data validation rule applied to it.

    Throws

    [[ArgumentException]] Occurs when the 'cell' is a total cell of a table.

    See

    [[add]]

    Parameters

    Returns void

  • Applies an [[CustomDataValidationRule]] to the cells in a [[WorksheetRegion]].

    Throws

    [[ArgumentNullException]] Occurs when 'rule' is null.

    Throws

    [[ArgumentNullException]] Occurs when 'region' is null.

    Throws

    [[ArgumentException]] Occurs when the 'region' is from a worksheet other than this collection.

    Throws

    [[ArgumentException]] Occurs when the 'rule' already applied to another worksheet.

    Throws

    [[ArgumentException]] Occurs when the 'rule' is invalid based on its rule type's requirements.

    Throws

    [[ArgumentException]] Occurs when the one or more of the cells in the 'region' already have a data validation rule applied to it.

    Throws

    [[ArgumentException]] Occurs when the one or more of the cells in the 'region' is a total cell of a table.

    See

    [[add]]

    Parameters

    Returns void

  • Applies a data validation rule to the a set of references.

    Throws

    [[ArgumentNullException]] Occurs when 'rule' is null.

    Throws

    [[ArgumentNullException]] Occurs when 'references' is null.

    Throws

    [[ArgumentException]] Occurs when the 'references' are from a worksheet other than this collection.

    Throws

    [[ArgumentException]] Occurs when the 'rule' already applied to another worksheet.

    Throws

    [[ArgumentException]] Occurs when the 'rule' is invalid based on its rule type's requirements.

    Throws

    [[ArgumentException]] Occurs when the one or more of the cells in the 'references' collection are in the totals row of a table.

    Parameters

    Returns void

  • Applies a data validation rule to the a set of references.

    Throws

    [[ArgumentNullException]] Occurs when 'rule' is null.

    Throws

    [[ArgumentNullException]] Occurs when 'references' is null.

    Throws

    [[ArgumentException]] Occurs when the 'references' are from a worksheet other than this collection.

    Throws

    [[ArgumentException]] Occurs when the 'rule' already applied to another worksheet.

    Throws

    [[ArgumentException]] Occurs when the 'rule' is invalid based on its rule type's requirements.

    Throws

    [[ArgumentException]] Occurs when 'overwriteExistingRules' is False and the one or more of the cells in the 'references' collection already have a data validation rule applied to it.

    Throws

    [[ArgumentException]] Occurs when the one or more of the cells in the 'references' collection are in the totals row of a table.

    Parameters

    • rule: DataValidationRule

      The data validation rule to apply to the set of references.

    • references: WorksheetReferenceCollection

      The reference to which the data validation rule should be applied.

    • overwriteExistingRules: boolean

      Indicates whether cells in the references collection which already have data validation rules should have the rules overwritten.

    Returns void

  • Applies an [[ListDataValidationRule]] to a [[WorksheetCell]].

    Throws

    [[ArgumentNullException]] Occurs when 'rule' is null.

    Throws

    [[ArgumentNullException]] Occurs when 'cell' is null.

    Throws

    [[ArgumentException]] Occurs when the 'cell' is from a worksheet other than this collection.

    Throws

    [[ArgumentException]] Occurs when the 'rule' already applied to another worksheet.

    Throws

    [[ArgumentException]] Occurs when the 'rule' is invalid based on its rule type's requirements.

    Throws

    [[ArgumentException]] Occurs when the 'cell' already has a data validation rule applied to it.

    Throws

    [[ArgumentException]] Occurs when the 'cell' is a total cell of a table.

    See

    [[add]]

    Parameters

    Returns void

  • Applies an [[ListDataValidationRule]] to the cells in a [[WorksheetRegion]].

    Throws

    [[ArgumentNullException]] Occurs when 'rule' is null.

    Throws

    [[ArgumentNullException]] Occurs when 'region' is null.

    Throws

    [[ArgumentException]] Occurs when the 'region' is from a worksheet other than this collection.

    Throws

    [[ArgumentException]] Occurs when the 'rule' already applied to another worksheet.

    Throws

    [[ArgumentException]] Occurs when the 'rule' is invalid based on its rule type's requirements.

    Throws

    [[ArgumentException]] Occurs when the one or more of the cells in the 'region' already have a data validation rule applied to it.

    Throws

    [[ArgumentException]] Occurs when the one or more of the cells in the 'region' is a total cell of a table.

    See

    [[add]]

    Parameters

    Returns void

  • Applies an [[OneConstraintDataValidationRule]] to a [[WorksheetCell]].

    Throws

    [[ArgumentNullException]] Occurs when 'rule' is null.

    Throws

    [[ArgumentNullException]] Occurs when 'cell' is null.

    Throws

    [[ArgumentException]] Occurs when the 'cell' is from a worksheet other than this collection.

    Throws

    [[ArgumentException]] Occurs when the 'rule' already applied to another worksheet.

    Throws

    [[ArgumentException]] Occurs when the 'rule' is invalid based on its rule type's requirements.

    Throws

    [[ArgumentException]] Occurs when the 'cell' already has a data validation rule applied to it.

    Throws

    [[ArgumentException]] Occurs when the 'cell' is a total cell of a table.

    See

    [[add]]

    Parameters

    Returns void

  • Applies an [[OneConstraintDataValidationRule]] to the cells in a [[WorksheetRegion]].

    Throws

    [[ArgumentNullException]] Occurs when 'rule' is null.

    Throws

    [[ArgumentNullException]] Occurs when 'region' is null.

    Throws

    [[ArgumentException]] Occurs when the 'region' is from a worksheet other than this collection.

    Throws

    [[ArgumentException]] Occurs when the 'rule' already applied to another worksheet.

    Throws

    [[ArgumentException]] Occurs when the 'rule' is invalid based on its rule type's requirements.

    Throws

    [[ArgumentException]] Occurs when the one or more of the cells in the 'region' already have a data validation rule applied to it.

    Throws

    [[ArgumentException]] Occurs when the one or more of the cells in the 'region' is a total cell of a table.

    See

    [[add]]

    Parameters

    Returns void

  • Applies an [[TwoConstraintDataValidationRule]] to a [[WorksheetCell]].

    Throws

    [[ArgumentNullException]] Occurs when 'rule' is null.

    Throws

    [[ArgumentNullException]] Occurs when 'cell' is null.

    Throws

    [[ArgumentException]] Occurs when the 'cell' is from a worksheet other than this collection.

    Throws

    [[ArgumentException]] Occurs when the 'rule' already applied to another worksheet.

    Throws

    [[ArgumentException]] Occurs when the 'rule' is invalid based on its rule type's requirements.

    Throws

    [[ArgumentException]] Occurs when the 'cell' already has a data validation rule applied to it.

    Throws

    [[ArgumentException]] Occurs when the 'cell' is a total cell of a table.

    See

    [[add]]

    Parameters

    Returns void

  • Applies an [[TwoConstraintDataValidationRule]] to the cells in a [[WorksheetRegion]].

    Throws

    [[ArgumentNullException]] Occurs when 'rule' is null.

    Throws

    [[ArgumentNullException]] Occurs when 'region' is null.

    Throws

    [[ArgumentException]] Occurs when the 'region' is from a worksheet other than this collection.

    Throws

    [[ArgumentException]] Occurs when the 'rule' already applied to another worksheet.

    Throws

    [[ArgumentException]] Occurs when the 'rule' is invalid based on its rule type's requirements.

    Throws

    [[ArgumentException]] Occurs when the one or more of the cells in the 'region' already have a data validation rule applied to it.

    Throws

    [[ArgumentException]] Occurs when the one or more of the cells in the 'region' is a total cell of a table.

    See

    [[add]]

    Parameters

    Returns void

  • Removes all data validation rules from the [[worksheet]].

    Returns void

  • Determines whether the specified data validation rule exists on the [[worksheet]].

    Parameters

    Returns boolean

  • Determines whether the specified cell has a data validation rule applied to it.

    Throws

    [[ArgumentNullException]] Occurs when 'cell' is null.

    Throws

    [[ArgumentException]] Occurs when the 'cell' is from a worksheet other than this collection.

    Parameters

    Returns boolean

  • Determines whether the specified references collection has a data validation rule applied to any of it's cells.

    Throws

    [[ArgumentNullException]] Occurs when 'references' is null.

    Throws

    [[ArgumentException]] Occurs when the 'references' are from a worksheet other than this collection.

    Parameters

    Returns boolean

  • Determines whether the specified region has a data validation rule applied to any of it's cells.

    Throws

    [[ArgumentNullException]] Occurs when 'region' is null.

    Throws

    [[ArgumentException]] Occurs when the 'region' is from a worksheet other than this collection.

    Parameters

    Returns boolean

  • Parameters

    • other: any

    Returns boolean

  • Find the data validation rule applied to the specified cell.

    Throws

    [[ArgumentNullException]] Occurs when 'cell' is null.

    Throws

    [[ArgumentException]] Occurs when the 'cell' is from a worksheet other than this collection.

    Parameters

    Returns DataValidationRule

  • Returns number

  • Gets or sets the references which have the data validation rule applied to it.

    Throws

    [[ArgumentNullException]] Occurs when the 'rule' is null.

    Throws

    [[KeyNotFoundException]] Occurs when the property is retrieved and the 'rule' is not applied to the [[worksheet]].

    Throws

    [[ArgumentException]] Occurs when the property is set and the value is from a Worksheet other than this collection.

    Throws

    [[ArgumentException]] Occurs when the property is set and the 'rule' is invalid based on its rule type's requirements.

    Parameters

    Returns WorksheetReferenceCollection

  • Returns Base

  • Removes the data validation rule form the cell if one is applied.

    If the rule is only applied to the specified cell, it will be removed from the collection.

    Throws

    [[ArgumentNullException]] Occurs when 'cell' is null.

    Throws

    [[ArgumentException]] Occurs when the 'cell' is from a worksheet other than this collection.

    Parameters

    • cell: WorksheetCell

      The cell which should have its data validation rule cleared.

    Returns boolean

  • Removes the data validation rule form all cells in the specified collection.

    If any rules in the collection are not applied to any cells after this operation, they will be removed from the collection.

    Throws

    [[ArgumentNullException]] Occurs when 'references' is null.

    Throws

    [[ArgumentException]] Occurs when the 'references' are from a worksheet other than this collection.

    Parameters

    Returns boolean

  • Removes the data validation rule form all cells in the specified region.

    If any rules in the collection are not applied to any cells after this operation, they will be removed from the collection.

    Throws

    [[ArgumentNullException]] Occurs when 'region' is null.

    Throws

    [[ArgumentException]] Occurs when the 'region' is from a worksheet other than this collection.

    Parameters

    • region: WorksheetRegion

      The region which should have its data validation rules cleared.

    Returns boolean

  • Removes the specified rule from the [[worksheet]].

    Throws

    [[ArgumentNullException]] Occurs when 'rule' is null.

    Parameters

    Returns boolean

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Returns void