Skip to content

Table

new Table(
jsf,
ref,
host): Table;

Table

A1Reference

TableHost

Table

get dataRowCount(): number;

Number of data rows (excludes header and totals).

number


get headerRowCount(): number;

number


get name(): string;

string


get ref(): string;

string


get sheetName(): string;

string


get totalsRowCount(): number;

number

appendRow(values?): number;

Append a data row to the table: shifts cells within the table’s column range, expands the table ref, and writes the supplied cell values (blanking any unset columns within the table width).

Uses column-scoped moveCells rather than full-row insertRows so that sibling tables on the same sheet in non-overlapping columns are not affected.

Recalculation is deferred: the caller must call model.recalculate(ALL_FORMULA_CELLS) afterward. A full recalc (not incremental) is needed because the dependency graph does not yet have edges for the newly expanded table range, so structured references like =SUM(Table[Column]) will not update incrementally.

CellValue[]

A single row of cell values, e.g. [‘Alice’, 95000]

number

Zero-based index of the newly added row within the data body


column(name, include):
| FormulaError
| Reference;

string

WhichRows

| FormulaError | Reference


columnRange(
from,
to,
include):
| FormulaError
| Reference;

string

string

WhichRows

| FormulaError | Reference


containsCoords(row, column): boolean;

number

number

boolean


insertRow(index, values?): number;

Insert a data row at the given position within the data body. Shifts existing rows down.

Recalculation is deferred: the caller must call model.recalculate(ALL_FORMULA_CELLS) afterward. See appendRow for why a full recalc is needed.

number

Zero-based position within the data body

CellValue[]

A single row of cell values

number

The data row index that was passed in


rename(newName): void;

Rename this table and rewrite all structured references in formulas.

string

void


rowRef(dataRowIndex):
| FormulaError
| Reference;

Get a single data row as a Reference covering all columns.

number

| FormulaError | Reference


wholeTable(whichRows):
| FormulaError
| Reference;

WhichRows

| FormulaError | Reference