Skip to content

API reference / Common / Engine types / TableFragment

Interface: TableFragment ​

A rectangular block of cells lifted from one table — the fragment twin of a TableSelection's cell block, and the table arm of CommonFragment.

Cells, and nothing else. No ids, because a cell has none — its identity is the (row, column) pair of the table it sits in, which the block's own shape supplies and the paste's anchor re-supplies at the far end. No column widths or row heights either: those belong to the table the block came from, and pasting a block should not resize the table it lands in (neither Word nor PowerPoint does). What travels is what a cell is — its content, its properties, and its merge state.

Rectangular by construction: a copy that cannot form a full rectangle declines rather than dropping a slot, since a fragment with a hole in it would paste every cell after the hole one place out.

A whole table is not this. Copying a table as an object is copying its graphic frame, which a ShapeFragment already carries — this is for a pick inside one.

Properties ​

PropertyDescription
cells
TableRegularCell[][]
The block's cells, row-major: one entry per row of the block, each holding one cell per column of it. Every row has the same length.