docx-editor

Tables

Editing tables, table styles, and how a long table continues.

Editing tables

Insert and remove rows, columns, and tables. Merge, split, and resize columns and rows, and format, vertically align, and pad cells. A new table is as wide as a line of body text in its section. A table inside a table cell is preserved rather than edited.

Table styles

A table style is displayed, including its header row, closing row, edge columns, corners, and banded rows.

Long tables

A table that runs past the bottom of a page breaks between rows and continues on the next page, repeating its header rows.

Limitations

Editing any cell of a table rewrites the cells that continue a vertical merge: they lose their own contents and take the starting cell's properties, its shading and borders among them. An untouched table keeps them.

A style's first-column formatting overrides its header-row formatting where both apply, so the top-left cell can look different from Word. A corner-specific format overrides both.

A table wider than the sheet is drawn shrunk to fit; the saved file keeps its width.

A table is shown as a placeholder when its rows cannot be read, or when a bookmark or similar marker sits right after a cell that continues a vertical merge. A row wrapped in a content control is read, and the control is kept around that row. A row wrapped in custom XML or in a tracked change, and a content control holding more than one row, still make the table a placeholder. Other markers between rows or cells are kept, and the table stays editable. Deleting a row or column is unavailable when it would remove such a marker.

Tables in the Editor API lists the commands and queries behind these controls.

On this page