Table
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Table( jsf, ref, host): Table;Parameters
Section titled “Parameters”Table
TableHost
Returns
Section titled “Returns”Table
Accessors
Section titled “Accessors”dataRowCount
Section titled “dataRowCount”Get Signature
Section titled “Get Signature”get dataRowCount(): number;Number of data rows (excludes header and totals).
Returns
Section titled “Returns”number
headerRowCount
Section titled “headerRowCount”Get Signature
Section titled “Get Signature”get headerRowCount(): number;Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get name(): string;Returns
Section titled “Returns”string
Get Signature
Section titled “Get Signature”get ref(): string;Returns
Section titled “Returns”string
sheetName
Section titled “sheetName”Get Signature
Section titled “Get Signature”get sheetName(): string;Returns
Section titled “Returns”string
totalsRowCount
Section titled “totalsRowCount”Get Signature
Section titled “Get Signature”get totalsRowCount(): number;Returns
Section titled “Returns”number
Methods
Section titled “Methods”appendRow()
Section titled “appendRow()”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.
Parameters
Section titled “Parameters”values?
Section titled “values?”A single row of cell values, e.g. [‘Alice’, 95000]
Returns
Section titled “Returns”number
Zero-based index of the newly added row within the data body
column()
Section titled “column()”column(name, include): | FormulaError | Reference;Parameters
Section titled “Parameters”string
include
Section titled “include”WhichRows
Returns
Section titled “Returns”columnRange()
Section titled “columnRange()”columnRange( from, to, include): | FormulaError | Reference;Parameters
Section titled “Parameters”string
string
include
Section titled “include”WhichRows
Returns
Section titled “Returns”containsCoords()
Section titled “containsCoords()”containsCoords(row, column): boolean;Parameters
Section titled “Parameters”number
column
Section titled “column”number
Returns
Section titled “Returns”boolean
insertRow()
Section titled “insertRow()”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.
Parameters
Section titled “Parameters”number
Zero-based position within the data body
values?
Section titled “values?”A single row of cell values
Returns
Section titled “Returns”number
The data row index that was passed in
rename()
Section titled “rename()”rename(newName): void;Rename this table and rewrite all structured references in formulas.
Parameters
Section titled “Parameters”newName
Section titled “newName”string
Returns
Section titled “Returns”void
rowRef()
Section titled “rowRef()”rowRef(dataRowIndex): | FormulaError | Reference;Get a single data row as a Reference covering all columns.
Parameters
Section titled “Parameters”dataRowIndex
Section titled “dataRowIndex”number
Returns
Section titled “Returns”wholeTable()
Section titled “wholeTable()”wholeTable(whichRows): | FormulaError | Reference;Parameters
Section titled “Parameters”whichRows
Section titled “whichRows”WhichRows