An object that represents the selected items within a [[Spreadsheet]]

Hierarchy

Hierarchy

  • PropertyChangeNotifierExtended
    • SpreadsheetSelection

Constructors

  • Parameters

    Returns SpreadsheetSelection

Properties

$type: Type
propertyChanged: ((sender, e) => void)

Type declaration

    • (sender, e): void
    • Parameters

      • sender: any
      • e: PropertyChangedEventArgs

      Returns void

$t: Type
nextHashCode: number

Accessors

  • get activeCell(): SpreadsheetCell
  • Returns the cell that represents the active cell.

    Returns SpreadsheetCell

  • get activeCellRangeIndex(): number
  • Returns the index of the selection group that contains the active cell.

    Returns number

  • get cellRanges(): IList$1<SpreadsheetCellRange>
  • Returns a read-only collection of the ranges of cells that are selected.

    Returns IList$1<SpreadsheetCellRange>

  • get cellRangesAddress(): string
  • Returns or sets a string containing the cell ranges in A1 cell reference mode.

    If there are multiple ranges then they are separated by the default union operator (',').

    Returns string

  • set cellRangesAddress(a): void
  • Parameters

    • a: string

    Returns void

Methods

  • Adds a new cell range for the specified cell and makes it the active cell.

    Throws

    [[ArgumentException]] The 'activeCell' must be within the specified 'range'.

    Parameters

    • range: SpreadsheetCellRange

      The new range to add

    • activeCell: SpreadsheetCell

      The new active cell for which a new selection will be added. This must be a cell within 'range'.

    • Optional extendRangeForMergedCells: boolean

      True to adjust the 'range' such that it contains any intersecting merged cells; otherwise false to use the range as it is.

    Returns boolean

  • Adds a new cell range for the specified cell and makes it the active cell.

    Throws

    [[ArgumentException]] The 'activeCellAddress' must be within the specified 'rangeAddress'.

    Parameters

    • rangeAddress: string

      The new A1 address of the range to add

    • activeCellAddress: string

      The A1 address of the new active cell for which a new selection will be added. This must be a cell within 'rangeAddress'.

    • Optional extendRangeForMergedCells: boolean

      True to adjust the 'rangeAddress' such that it contains any intersecting merged cells; otherwise false to use the range as it is.

    Returns boolean

  • Adds a new range to the end of the [[cellRanges]]

    Parameters

    • range: SpreadsheetCellRange

      The range to be added

    • Optional extendRangeForMergedCells: boolean

      True to adjust the 'range' such that it contains any intersecting merged cells; otherwise false to use the range as it is.

    Returns void

  • Adds a new range to the end of the [[cellRanges]]

    Parameters

    • rangeAddress: string

      The A1 address of the range to be added

    • Optional extendRangeForMergedCells: boolean

      True to adjust the 'rangeAddress' such that it contains any intersecting merged cells; otherwise false to use the range as it is.

    Returns void

  • Parameters

    • a: ITypedPropertyChangeListener$2<any, string>
    • b: boolean

    Returns void

  • Resets the [[cellRanges]] to a single range containing only the [[activeCell]]

    Returns boolean

  • Parameters

    • a: any
    • b: string
    • c: any

    Returns void

  • Parameters

    • other: any

    Returns boolean

  • Returns number

  • Returns Base

  • Parameters

    • a: any
    • b: string
    • c: any

    Returns void

  • Parameters

    • a: ITypedPropertyChangeListener$2<any, string>

    Returns void

  • Replaces the range containing the [[activeCell]] with the specified range and using the specified cell as the new [[activeCell]].

    Throws

    [[ArgumentException]] The 'activeCell' must be within the specified 'range'.

    Parameters

    • range: SpreadsheetCellRange

      The new range that will replace the range at index [[activeCellRangeIndex]].

    • activeCell: SpreadsheetCell

      The new active cell from within that range.

    • Optional extendRangeForMergedCells: boolean

      True to adjust the 'range' such that it contains any intersecting merged cells; otherwise false to use the range as it is.

    Returns boolean

  • Replaces the range containing the [[activeCell]] with the specified range and using the specified cell as the new [[activeCell]].

    Throws

    [[ArgumentException]] The 'activeCellAddress' must be within the specified 'rangeAddress'.

    Parameters

    • rangeAddress: string

      The A1 address of the new range that will replace the range at index [[activeCellRangeIndex]].

    • activeCellAddress: string

      The A1 address of the new active cell from within that range.

    • Optional extendRangeForMergedCells: boolean

      True to adjust the 'rangeAddress' such that it contains any intersecting merged cells; otherwise false to use the range as it is.

    Returns boolean

  • Clears the current selection and uses the specified information to reinitialize the selection.

    Throws

    [[ArgumentNullException]] The 'ranges' cannot be null.

    Throws

    [[ArgumentException]] The 'ranges' cannot be a 0 length array.

    Throws

    [[ArgumentOutOfRangeException]] The 'newActiveRangeIndex' must be an index within the specified 'ranges'.

    Throws

    [[ArgumentException]] The 'activeCell' must be within the range index specified by the 'newActiveRangeIndex'.

    Parameters

    • ranges: SpreadsheetCellRange[]

      The new selection ranges. There must be 1 or more ranges.

    • activeCell: SpreadsheetCell

      The cell to use for the [[activeCell]]. This must be within the specified 'ranges'.

    • newActiveRangeIndex: number

      The index of the range that contains the active cell.

    • Optional extendRangeForMergedCells: boolean

      True to adjust the 'ranges' such that it contains any intersecting merged cells; otherwise false to use the range as it is.

    Returns boolean

  • Clears the current selection and uses the specified cell as the [[activeCell]] and specified range as the new selection.

    Throws

    [[ArgumentException]] The 'activeCell' must be within the specified 'range'.

    Parameters

    • range: SpreadsheetCellRange

      The new selection range

    • activeCell: SpreadsheetCell

      The cell to use for the [[activeCell]]. This must be within the specified 'range'.

    • Optional extendRangeForMergedCells: boolean

      True to adjust the 'range' such that it contains any intersecting merged cells; otherwise false to use the range as it is.

    Returns boolean

  • Clears the current selection and uses the specified information to reinitialize the selection.

    Throws

    [[ArgumentException]] The 'rangesAddress' must contain at least 1 cell/range.

    Throws

    [[ArgumentOutOfRangeException]] The 'newActiveRangeIndex' must be an index within the specified 'rangesAddress'.

    Throws

    [[ArgumentException]] The 'activeCellAddress' must be within the range index specified by the 'newActiveRangeIndex'.

    Parameters

    • rangesAddress: string

      The new selection ranges. There must be 1 or more ranges.

    • activeCellAddress: string

      The cell to use for the [[activeCell]]. This must be within the specified 'rangesAddress'.

    • newActiveRangeIndex: number

      The index of the range that contains the active cell.

    • Optional extendRangeForMergedCells: boolean

      True to adjust the 'rangesAddress' such that it contains any intersecting merged cells; otherwise false to use the range as it is.

    Returns boolean

  • Changes the [[activeCell]] and [[activeCellRangeIndex]] to the specified values.

    Parameters

    • cell: SpreadsheetCell

      The selected cell to change to the active cell

    • Optional rangeIndex: number

      Optionally the index of the range in the [[cellRanges]] that contains the specified cell.

    Returns boolean

  • Changes the [[activeCell]] and [[activeCellRangeIndex]] to the specified values.

    Parameters

    • cellAddress: string

      The A1 address of the selected cell to change to the active cell

    • Optional rangeIndex: number

      Optionally the index of the range in the [[cellRanges]] that contains the specified cell.

    Returns boolean

  • Deselect the cells in the specified range.

    Note: if the specified range encompasses all the cells in the selection, the selection will be changed to only include the current [[activeCell]].

    Parameters

    Returns void

  • 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