Skip to content

TableManager

  • TableHost
new TableManager(workbook): TableManager;

Workbook

TableManager

iterator: IterableIterator<Table>;

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).

Table

Table


adjustTableRefsForColMove(
sheetName,
from,
to,
count): void;

Adjust table refs after a moveColumns operation. Column-axis mirror of adjustTableRefsForRowMove.

string

number

number

number

void


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.

string

number

0-based column where the edit starts

number

Positive for insertion, negative for deletion.

void


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.

A1Reference

A1Reference

void


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 by to − from.
  • Tables fully within the displaced range shift by ±count.
  • Partially overlapping tables are left unchanged.

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

void


adjustTableRefsForRowShift(
sheetName,
atRow,
count,
options?): void;

Adjust table refs after rows are inserted or deleted on a sheet.

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).

Table

A table to skip (the one performing the edit).

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.

number

void

TableHost.adjustTableRefsForRowShift

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.

string

boolean

boolean


get(name): Table | null;

Look up a table by name (case-insensitive).

string

Table | null


getAll(): Table[];

Return all tables in the workbook.

Table[]