TableManager
Implements
Section titled “Implements”TableHost
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TableManager(workbook): TableManager;Parameters
Section titled “Parameters”workbook
Section titled “workbook”Returns
Section titled “Returns”TableManager
Methods
Section titled “Methods”[iterator]()
Section titled “[iterator]()”iterator: IterableIterator<Table>;Returns
Section titled “Returns”IterableIterator<Table>
add(jsfTable): Table;Create and register a new table from a JSF table definition. Throws on validation failure (invalid name, invalid ref, name collision).
Parameters
Section titled “Parameters”jsfTable
Section titled “jsfTable”Table
Returns
Section titled “Returns”adjustTableRefsForColMove()
Section titled “adjustTableRefsForColMove()”adjustTableRefsForColMove( sheetName, from, to, count): void;Adjust table refs after a moveColumns operation. Column-axis mirror of adjustTableRefsForRowMove.
Parameters
Section titled “Parameters”sheetName
Section titled “sheetName”string
number
number
number
Returns
Section titled “Returns”void
adjustTableRefsForColShift()
Section titled “adjustTableRefsForColShift()”adjustTableRefsForColShift( sheetName, atCol, count): void;Adjust table refs (and column definitions) after columns are inserted or deleted on a sheet. Mirrors adjustTableRefsForRowShift but along the column axis.
Parameters
Section titled “Parameters”sheetName
Section titled “sheetName”string
number
0-based column where the edit starts
number
Positive for insertion, negative for deletion.
Returns
Section titled “Returns”void
adjustTableRefsForMove()
Section titled “adjustTableRefsForMove()”adjustTableRefsForMove(fromRef, toRef): void;After a moveCells operation, update the refs of any tables that were fully contained within the source range. Tables only partially overlapping the source, or at the destination, are not affected --- matching Excel’s behavior.
Parameters
Section titled “Parameters”fromRef
Section titled “fromRef”Returns
Section titled “Returns”void
adjustTableRefsForRowMove()
Section titled “adjustTableRefsForRowMove()”adjustTableRefsForRowMove( sheetName, from, to, count): void;Adjust table refs after a moveRows operation. The three-step insert/move/delete sequence in moveRowsOrColumns has already moved cells; this adjusts table refs to match the net effect:
- Tables fully within the source
[from, from+count)move byto − from. - Tables fully within the displaced range shift by
±count. - Partially overlapping tables are left unchanged.
Parameters
Section titled “Parameters”sheetName
Section titled “sheetName”string
number
0-based index of the first row that was moved
number
0-based index where the first row ended up
number
number of rows moved
Returns
Section titled “Returns”void
adjustTableRefsForRowShift()
Section titled “adjustTableRefsForRowShift()”adjustTableRefsForRowShift( sheetName, atRow, count, options?): void;Adjust table refs after rows are inserted or deleted on a sheet.
Parameters
Section titled “Parameters”sheetName
Section titled “sheetName”string
number
0-based row where the structural edit starts
number
Positive for insertion (shift down), negative for deletion
(rows atRow..atRow+|count|-1 removed, remaining shift up).
options?
Section titled “options?”exclude?
Section titled “exclude?”A table to skip (the one performing the edit).
leftCol?
Section titled “leftCol?”number
/ rightCol When provided, only tables whose columns are fully contained within [leftCol, rightCol] are affected (for column-scoped shifts such as Table.insertRow). Tables that only partially overlap are skipped to avoid misaligning their non-shifted columns.
rightCol?
Section titled “rightCol?”number
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”TableHost.adjustTableRefsForRowShiftdelete()
Section titled “delete()”delete(name, options?): boolean;Remove a table by name. Returns false if the table does not exist.
By default only the table definition is removed; cell data is left intact.
Pass { clearData: true } to also clear cell contents in the table’s range.
Parameters
Section titled “Parameters”string
options?
Section titled “options?”clearData?
Section titled “clearData?”boolean
Returns
Section titled “Returns”boolean
get(name): Table | null;Look up a table by name (case-insensitive).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Table | null
getAll()
Section titled “getAll()”getAll(): Table[];Return all tables in the workbook.
Returns
Section titled “Returns”Table[]