Interface SheetDataSourceIf

The data a SheetEngine computes on: inputs by physical row and column (0-based) – values or formula texts ("=B2*C2"). The table has adapters for its models; SheetEngine.fromArrays uses a 2-D array.

Example

const source: SheetDataSourceIf = {
getRowCount: () => data.length,
getColumnCount: () => 4,
getInput: (row, col) => data[row][col],
};

Since

1.1.99

Hierarchy

  • SheetDataSourceIf

Methods

  • Optional, for sparse data (a sheet with a million empty rows): calls fn for every cell that may hold an input – rebuild() then reads only these instead of rows × columns.

    Parameters

    • fn: ((row, col, input) => void)
        • (row, col, input): void
        • Parameters

          • row: number
          • col: number
          • input: unknown

          Returns void

    Returns void

  • The column of a data field for [field] in a cell formula, -1 if it is none.

    Parameters

    • field: string

    Returns number

  • False for a column whose =… texts are plain text (ColumnDef.cellFormulas: false). Default: true.

    Parameters

    • col: number

    Returns boolean