Skip to main content

Word.TableRow

Word.TableRow is an object type of the Word module (Office.word(iframe)). 6 methods.

Generated from the SDK type definitions

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

Methods

MethodDescription
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

NameTypeDescription
columnIndexnumber0-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

NameTypeDescription
position (optional)InsertAtinsert position: "before" (above) | "after" (below) (default: InsertAt.AFTER)

Returns

Promise<TableRow> - the newly created row