SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface SparseBuilder<T>

    A Builder for setting values in a streaming sparse grid.

    Coordinates must increase monotonically in the current axis — row then column in row-major mode, column then row in column-major mode.

    interface SparseBuilder<T extends Scalar = Scalar> {
        build(): IRange<T>;
        pushAt(row: number, col: number, value: T): this;
        pushMultipleAt(row: number, col: number, value: IRange<Scalar> | T[]): this;
    }

    Type Parameters

    • T extends Scalar = Scalar

      The type of values stored within the tuples.

    Index
    • Adds a single value associated with a specific major and minor index.

      Parameters

      • row: number

        The row index.

      • col: number

        The column index.

      • value: T

        The value to be added.

      Returns this

      Error If the point is out of order compared to previously added points (within the same row).

      If the value is an Array, it will be treated as a discrete value. If you want to set multiple values along the minor axis, then use pushMultipleAt.

    • Adds multiple values associated with a specific row and column index.

      Parameters

      • row: number

        The row index.

      • col: number

        The column index.

      • value: IRange<Scalar> | T[]

        The values to add. Accepts an IRange or a native array. 2D ranges are flattened in row-major order.

      Returns this

      Error If the point is out of order compared to previously added points (within the same row).