Word.TableRow
Word.TableRow is an object type of the Word module (Office.word(iframe)). 6 methods.
Word · 14 object types · 259 methods · namespace Word. This reference is generated from the API document artifact (sdk-api-doc.html) produced with the SDK build. Descriptions are the editor's API comments as published. Pin the SDK and Office versions together and regenerate when either changes.
Remarks
- Module: Word ·
Office.word(iframe)· namespaceWord - Obtained from:
Table.getRow(rowIndex),Table.insertRow(rowIndex, position) - Every method returns a
Promise; signatures use TypeScript notation.
Methods
| Method | Description |
|---|---|
delete() | Deletes this row. |
getCell(columnIndex) | Returns the cell at the given column in this row. |
getCells() | Returns the list of cells in this row. |
getIndex() | Returns the row index. |
getTable() | Returns the table this row belongs to. |
insertSibling(position) | Inserts a new row above or below this row. |
Method details
delete()
Deletes this row.
delete(): Promise<void>;
Returns
Promise<void>
getCell(columnIndex)
Returns the cell at the given column in this row.
getCell(columnIndex: number): Promise<TableCell>;
Parameters
| Name | Type | Description |
|---|---|---|
columnIndex | number | 0-based column index |
Returns
Promise<TableCell> - the cell at that column
getCells()
Returns the list of cells in this row. - Returned in column order, including merged cells.
getCells(): Promise<TableCell[]>;
Returns
Promise<TableCell[]> - cells in column order
getIndex()
Returns the row index.
getIndex(): Promise<number>;
Returns
Promise<number> - 0-based row index
getTable()
Returns the table this row belongs to.
getTable(): Promise<Table>;
Returns
Promise<Table> - the table this row belongs to
insertSibling(position)
Inserts a new row above or below this row.
insertSibling(position?: InsertAt): Promise<TableRow>;
Parameters
| Name | Type | Description |
|---|---|---|
position (optional) | InsertAt | insert position: "before" (above) | "after" (below) (default: InsertAt.AFTER) |
Returns
Promise<TableRow> - the newly created row