Class TableCell

  • TableCell represents a single cell within a table structure.

  • Methods are available to retrieve information about the cell's position, span, content alignment, fill, merge state, and parent elements.

  • You can get the text content of a TableCell using the getText() method.

  • The content alignment of the text within a TableCell can be set using the setContentAlignment() method.

  • All methods for TableCell require specific authorization scopes related to presentations.

TableCell

A cell in a table.

Methods

Method Return type Brief description
Integer Returns the 0-based column index of the table cell.
Integer Returns the column span of the table cell.
Content Alignment Returns the Content Alignment of the text in the table cell.
Fill Returns the fill of the table cell.
Table Cell |null Returns the head cell of this table cell.
Cell Merge State Returns the merge state of the table cell.
Table Column Returns the table column containing the current cell.
Table Row Returns the table row containing the current cell.
Table Returns the table containing the current cell.
Integer Returns the 0-based row index of the table cell.
Integer Returns the row span of the table cell.
Text Range Returns the text content of the table cell.
Table Cell Sets the Content Alignment of the text in the table cell.

Detailed documentation

getColumnIndex()

Returns the 0-based column index of the table cell.

Return

Integer

Authorization

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

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

getColumnSpan()

Returns the column span of the table cell.

Return

Integer

Authorization

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

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

getContentAlignment()

Returns the ContentAlignment of the text in the table cell.

Return

ContentAlignment

Authorization

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

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

getFill()

Returns the fill of the table cell.

Return

Fill

Authorization

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

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

getHeadCell()

Returns the head cell of this table cell. Returns null if this cell has not been merged or if this cell is the head cell.

Return

TableCell |null

Authorization

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

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

getMergeState()

Returns the merge state of the table cell.

Return

CellMergeState

Authorization

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

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

getParentColumn()

Returns the table column containing the current cell.

Return

TableColumn

Authorization

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

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

getParentRow()

Returns the table row containing the current cell.

Return

TableRow

Authorization

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

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

getParentTable()

Returns the table containing the current cell.

Return

Table

Authorization

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

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

getRowIndex()

Returns the 0-based row index of the table cell.

Return

Integer

Authorization

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

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

getRowSpan()

Returns the row span of the table cell.

Return

Integer

Authorization

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

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

getText()

Returns the text content of the table cell. Returns null if the cell is merged but is not a head cell.

Text within a table cell always terminates with a newline character.

Return

TextRange

Authorization

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

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

setContentAlignment(contentAlignment)

Sets the ContentAlignment of the text in the table cell.

Parameters

Name Type Description
content Alignment
Content Alignment The content alignment to set.

Return

TableCell — This TableCell , for chaining.

Authorization

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

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations
Design a Mobile Site
View Site in Mobile | Classic
Share by: