TableCellPosition Interface
Defines a cell position in a table.
#Declaration
export interface TableCellPosition
#Remarks
A TableCellPosition
object stores a cell’s position in a table. Pass two cell positions to the mergeCells
method to merge all cells in the specified range. The result cell has the same appearance settings as the first cell in the range.
The following code snippet merges 6 cells:
const subDocument = richEdit.selection.activeSubDocument;
const table = subDocument.tables.getByIndex(0);
const startCell = { rowIndex: 0, cellIndex: 0 };
const endCell = { rowIndex: 2, cellIndex: 1 };
table.mergeCells(startCell, endCell);
#Properties
#cellIndex Property
Returns a cell’s index in a row.
#Declaration
cellIndex: number
#Property Value
Type | Description |
---|---|
number | The cell index. |
#rowIndex Property
Returns a row’s index in a table.
#Declaration
rowIndex: number
#Property Value
Type | Description |
---|---|
number | The row index. |