TableCell

A cell in a table.

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/slides/table-cell#getColumnIndex()` | `Integer` | Returns the 0-based column index of the table cell. |
| `https://developers.google.com/apps-script/reference/slides/table-cell#getColumnSpan()` | `Integer` | Returns the column span of the table cell. |
| `https://developers.google.com/apps-script/reference/slides/table-cell#getContentAlignment()` | `https://developers.google.com/apps-script/reference/slides/content-alignment` | Returns the `https://developers.google.com/apps-script/reference/slides/content-alignment` of the text in the table cell. |
| `https://developers.google.com/apps-script/reference/slides/table-cell#getFill()` | `https://developers.google.com/apps-script/reference/slides/fill` | Returns the fill of the table cell. |
| `https://developers.google.com/apps-script/reference/slides/table-cell#getHeadCell()` | `https://developers.google.com/apps-script/reference/slides/table-cell#|null` | Returns the head cell of this table cell. |
| `https://developers.google.com/apps-script/reference/slides/table-cell#getMergeState()` | `https://developers.google.com/apps-script/reference/slides/cell-merge-state` | Returns the merge state of the table cell. |
| `https://developers.google.com/apps-script/reference/slides/table-cell#getParentColumn()` | `https://developers.google.com/apps-script/reference/slides/table-column` | Returns the table column containing the current cell. |
| `https://developers.google.com/apps-script/reference/slides/table-cell#getParentRow()` | `https://developers.google.com/apps-script/reference/slides/table-row` | Returns the table row containing the current cell. |
| `https://developers.google.com/apps-script/reference/slides/table-cell#getParentTable()` | `https://developers.google.com/apps-script/reference/slides/table` | Returns the table containing the current cell. |
| `https://developers.google.com/apps-script/reference/slides/table-cell#getRowIndex()` | `Integer` | Returns the 0-based row index of the table cell. |
| `https://developers.google.com/apps-script/reference/slides/table-cell#getRowSpan()` | `Integer` | Returns the row span of the table cell. |
| `https://developers.google.com/apps-script/reference/slides/table-cell#getText()` | `https://developers.google.com/apps-script/reference/slides/text-range` | Returns the text content of the table cell. |
| `https://developers.google.com/apps-script/reference/slides/table-cell#setContentAlignment(ContentAlignment)` | `https://developers.google.com/apps-script/reference/slides/table-cell#` | Sets the `https://developers.google.com/apps-script/reference/slides/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://developers.google.com/apps-script/concepts/scopes#setting_explicit_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://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getContentAlignment()`

Returns the `https://developers.google.com/apps-script/reference/slides/content-alignment` of the text in the table cell.

#### Return


`https://developers.google.com/apps-script/reference/slides/content-alignment`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getFill()`

Returns the fill of the table cell.

#### Return


`https://developers.google.com/apps-script/reference/slides/fill`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_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


`https://developers.google.com/apps-script/reference/slides/table-cell#|null`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getMergeState()`

Returns the merge state of the table cell.

#### Return


`https://developers.google.com/apps-script/reference/slides/cell-merge-state`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getParentColumn()`

Returns the table column containing the current cell.

#### Return


`https://developers.google.com/apps-script/reference/slides/table-column`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getParentRow()`

Returns the table row containing the current cell.

#### Return


`https://developers.google.com/apps-script/reference/slides/table-row`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getParentTable()`

Returns the table containing the current cell.

#### Return


`https://developers.google.com/apps-script/reference/slides/table`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_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://developers.google.com/apps-script/concepts/scopes#setting_explicit_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://developers.google.com/apps-script/concepts/scopes#setting_explicit_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


`https://developers.google.com/apps-script/reference/slides/text-range`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `setContentAlignment(contentAlignment)`

Sets the `https://developers.google.com/apps-script/reference/slides/content-alignment` of the text in the table cell.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `contentAlignment` | `https://developers.google.com/apps-script/reference/slides/content-alignment` | The content alignment to set. |

#### Return


`https://developers.google.com/apps-script/reference/slides/table-cell#` --- This `https://developers.google.com/apps-script/reference/slides/table-cell#`, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`