Class TableRow

  • A TableRow represents a row in a table and consists of a list of table cells, identified by its index.

  • Methods are available to get a specific cell by index, retrieve the row's index, get the minimum height, find the number of cells, access the parent table, and remove the row.

  • Detailed documentation for each method provides information on parameters, return types, and required authorization scopes.

TableRow

A row in a table. A row consists of a list of table cells. A row is identified by the row index.

Methods

MethodReturn typeBrief description
getCell(cellIndex)TableCellReturns the cell at the specified index.
getIndex()IntegerReturns the 0-based index of the row.
getMinimumHeight()NumberReturns the minimum height of the row in points.
getNumCells()IntegerReturns the number of cells in this row.
getParentTable()TableReturns the table containing the current row.
remove()voidRemoves the table row.

Detailed documentation

getCell(cellIndex)

Returns the cell at the specified index.

Parameters

NameTypeDescription
cellIndexIntegerThe 0-based index of the cell to retrieve.

Return

TableCell — the cell.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getIndex()

Returns the 0-based index of the row.

Return

Integer

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getMinimumHeight()

Returns the minimum height of the row in points. The actual height depends on the length of thecontent of the cell.

Return

Number

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getNumCells()

Returns the number of cells in this row.

Return

Integer

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getParentTable()

Returns the table containing the current row.

Return

Table

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

remove()

Removes the table row.

If all the cells in the row are merged with other rows, the common rows spanned by thesecells are removed.

If no rows remain in the table after this removal, the whole table is removed.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-11 UTC.