SheetXL - v0.3.20
    Preparing search index...

    Interface IRangeSelection

    Interface representing a range selection within a sheet.

    interface IRangeSelection {
        addListeners(
            listeners: IRangeSelection.IListeners,
            options?: IListener.Options,
        ): Remove;
        append(
            start: IRange.CellCoords,
            end?: IRange.CellCoords,
            anchor?: Partial<IRange.CellCoords>,
        ): void;
        clear(): void;
        clearAndModify(
            start: Partial<IRange.CellCoords>,
            end?: Partial<IRange.CellCoords>,
            anchor?: Partial<IRange.CellCoords>,
        ): void;
        getAdjusting(): SelectionCoords;
        getCoords(): SelectionCoords;
        isEntire(): boolean;
        modify(
            cellAnchor: Partial<IRange.CellCoords>,
            cellPivot?: Partial<IRange.CellCoords>,
            resetAnchor?: boolean,
        ): void;
        navigate(
            direction: IRange.Direction,
            select?: boolean,
            contentful?: boolean,
            incrementAmount?: number,
        ): this;
        setAdjusting(range: SelectionCoords): void;
        traverse(orientation?: IRange.Orientation, reverse?: boolean): this;
        updateCoords(coords: SelectionCoords): this;
    }
    Index

    Methods

    • Clears the range selections.

      Returns void

      This does not affect the cell.

    • Checks if the entire range is selected.

      Returns boolean

      True if the entire range is selected, otherwise false.

    • Modifies the selection around the anchor.

      Parameters

      • cellAnchor: Partial<IRange.CellCoords>

        The anchor cell.

      • OptionalcellPivot: Partial<IRange.CellCoords>

        The pivot cell.

      • OptionalresetAnchor: boolean

        Whether to reset the anchor. Default is false.

      Returns void

    • Navigates the entire sheet

      Parameters

      • direction: IRange.Direction

        The direction to navigate.

      • Optionalselect: boolean

        Whether to select the cell after navigating.

      • Optionalcontentful: boolean

        Whether to navigate to contentful cells only.

      • OptionalincrementAmount: number

        The amount to increment.

      Returns this

      The current instance.

    • A special range used during drag.

      Parameters

      Returns void

      This fires an event.

    • Traverses the selection, moving to the next cell based on the orientation.

      Parameters

      • Optionalorientation: IRange.Orientation

        The orientation to traverse. Default is ICellRange.Orientation.Row.

      • Optionalreverse: boolean

        Whether to traverse in reverse. Default is false.

      Returns this

      The current instance.

      Useful for pressing tab or enter from the UI.

    • Updates the selection coordinates.

      Parameters

      Returns this

      The current instance.