Class WorksheetReferenceCollection

A collection of cells or regions which are all on the same worksheet.

Hierarchy

Hierarchy

  • Base
    • WorksheetReferenceCollection

Implements

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get cellsCount(): number
  • Gets the number of cells contains in all references in this collection.

    Returns number

  • get worksheet(): Worksheet
  • Gets the worksheet for which this collection contains references.

    Returns Worksheet

Methods

  • Adds a region to the collection of references.

    The region added to the collection must be from the same worksheet as the collection.

    If the region is already contained in the collection, or there is a region in the collection which fully contains the specified region, this call will have no effect on the collection.

    Throws

    ArgumentNullException Occurs when the 'region' is null.

    Throws

    ArgumentException Occurs when the 'region' is from a Worksheet other than the references collection.

    Parameters

    Returns void

  • Adds a cell to the collection of references.

    The cell added to the collection must be from the same worksheet as the collection.

    If the cell is already contained in the collection, or there is a region in the collection which contains the cell, this call will have no effect on the collection.

    Throws

    ArgumentNullException Occurs when the 'cell' is null.

    Throws

    ArgumentException Occurs when the 'cell' is from a Worksheet other than the references collection.

    Parameters

    Returns void

  • Adds a list of references to the collection of references.

    The references must be separated by one or more space (' ') characters.

    The references in the list cannot contain the worksheet name. They are all assumed to be from the worksheet of this collection.

    If all references are already contained in the collection this call will have no effect on the collection.

    Throws

    ArgumentNullException Occurs when the 'references' is null.

    Throws

    ArgumentException Occurs when the list of reference is not well formed.

    Parameters

    • references: string

      The space delimited list of references to add to the collection.

    Returns void

  • Adds a list of references to the collection of references.

    The references must be separated by one or more space (' ') characters.

    The references in the list cannot contain the worksheet name. They are all assumed to be from the worksheet of this collection.

    If all references are already contained in the collection this call will have no effect on the collection.

    Throws

    ArgumentNullException Occurs when the 'references' is null.

    Throws

    InvalidEnumArgumentException Occurs when 'cellReferenceMode' is not defined in the CellReferenceMode enumeration.

    Throws

    ArgumentException Occurs when the list of reference is not well formed.

    Parameters

    • references: string

      The space delimited list of references to add to the collection.

    • cellReferenceMode: CellReferenceMode

      The cell reference mode with which to parse the 'references'.

    Returns void

  • Clears all references from the collection.

    Returns void

  • Determines whether the collection contains the specified region.

    Throws

    ArgumentNullException Occurs when the 'region' is null.

    Returns

    True if the region is contained in the collection or a region which fully contains the specified region is contained in the collection; False otherwise.

    Parameters

    Returns boolean

  • Determines whether the collection contains the specified cell.

    Throws

    ArgumentNullException Occurs when the 'cell' is null.

    Returns

    True if the cell is contained in the collection or a region which contains the cell is contained in the collection; False otherwise.

    Parameters

    Returns boolean

  • Parameters

    • other: any

    Returns boolean

  • Returns number

  • Removes a region from the collection of references.

    If the region is not contained in the collection, this call will have no effect on the collection.

    Throws

    ArgumentNullException Occurs when the 'region' is null.

    Returns

    True if any cells in the region were found and removed. False otherwise.

    Parameters

    Returns boolean

  • Removes a cell from the collection of references.

    If the cell is not contained in the collection, this call will have no effect on the collection.

    Throws

    ArgumentNullException Occurs when the 'cell' is null.

    Returns

    True if the cell was found and removed. False otherwise.

    Parameters

    Returns boolean

  • Removes a list of references from the collection of references.

    The references must be separated by one or more space (' ') characters.

    The references in the list cannot contain the worksheet name. They are all assumed to be from the worksheet of this collection.

    If the references are not contained in the collection, this call will have no effect on the collection.

    Throws

    ArgumentNullException Occurs when the 'references' is null.

    Throws

    ArgumentException Occurs when the list of reference is not well formed.

    Returns

    True if any cells in the references were found and removed. False otherwise.

    Parameters

    • references: string

      The space delimited list of references to remove from the collection.

    Returns boolean

  • Removes a list of references from the collection of references.

    The references must be separated by one or more space (' ') characters.

    The references in the list cannot contain the worksheet name. They are all assumed to be from the worksheet of this collection.

    If the references are not contained in the collection, this call will have no effect on the collection.

    Throws

    ArgumentNullException Occurs when the 'references' is null.

    Throws

    InvalidEnumArgumentException Occurs when 'cellReferenceMode' is not defined in the CellReferenceMode enumeration.

    Throws

    ArgumentException Occurs when the list of reference is not well formed.

    Returns

    True if any cells in the references were found and removed. False otherwise.

    Parameters

    • references: string

      The space delimited list of references to remove from the collection.

    • cellReferenceMode: CellReferenceMode

      The cell reference mode with which to parse the 'references'.

    Returns boolean

  • Returns the string value represent the cell and region addresses in the collection.

    Returns string

  • Returns the string value represent the cell and region addresses in the collection.

    Throws

    InvalidEnumArgumentException Occurs when 'cellReferenceMode' is not defined in the CellReferenceMode enumeration.

    Parameters

    • cellReferenceMode: CellReferenceMode

      The cell reference mode with which to get the region strings.

    Returns string

  • 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