SheetXL - v0.3.20
    Preparing search index...

    Interface IncrementalUpdater<S>

    Provides an API for efficiently performing incremental updates to specific cells within a range.

    Unless ICellRange.StartUpdateOptions.allowUnorderedWrites is true the updates must be written in row-major or column-major order as determined by IRange.Orientation, with major/minor coordinates increasing on each update, otherwise an error will be thrown.

    const updater = range.startIncrementalUpdates();
    updater.pushAt(1, 1, "Hello"); // as row, column, primitive - fastest
    updater.push({ rowIndex: 2, colIndex: 1 }, { value: "Beautiful" }); // as coordinate and json object
    updater.push('A3', { value: "World" }); // as a1 string and json
    updater.apply();
    interface IncrementalUpdater<S = ICellRange> {
        apply(options?: UpdateCellsOptions): S;
        push(address: ICell.Address, update: ICell.Update): this;
        pushAt(row: number, col: number, update: ICell.Update): this;
        pushMultipleAt(row: number, col: number, updates: ICell.Update[]): this;
    }

    Type Parameters

    • S = ICellRange

      The return type of apply, typically the source range (ICellRange).

    Index

    Methods

    • Finalizes and applies all queued updates to the range.

      This method commits the changes added via push, pushAt, or pushMultipleAt.

      Parameters

      Returns S

      The source object, typically the range (ICellRange).

    • Adds an update at a specific cell address.

      Parameters

      Returns this

      The current IncrementalUpdater instance for chaining.

      Error If the coordinates are out of order compared to previously added coordinates.

    • Adds an update at a specific major (row) and minor (column) index.

      This method is slightly faster than push as it bypasses address parsing.

      Parameters

      • row: number

        The row index of the cell to update.

      • col: number

        The column index of the cell to update.

      • update: ICell.Update

        The update to apply. See ICell.Update.

      Returns this

      The current IncrementalUpdater instance for chaining.

      Error If the coordinates are out of order compared to previously added coordinates.

    • Adds multiple updates for contiguous cells along the minor axis (columns), starting at the specified indices.

      Parameters

      • row: number

        The row index of the starting cell.

      • col: number

        The column index of the starting cell.

      • updates: ICell.Update[]

        An array of updates to apply to contiguous cells.

      Returns this

      The current IncrementalUpdater instance for chaining.

      Error If the coordinates are out of order compared to previously added coordinates.