> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Tables

## `Table`

`PowerPoint.Table`: the `a:tbl` of a table graphic frame.

Import from `@reductoai/pptx/officejs`.

### Table properties

| Name | Type | Description |
| - | - | - |
| `columns` | `TableColumnCollection` | read-only |
| `rows` | `TableRowCollection` | read-only |
| `styleSettings` | `TableStyleSettings` | read-only |
| `columnCount` | `number` | read-only |
| `rowCount` | `number` | read-only |
| `values` | `string[][]` | read-only Cell text by grid position; the covered cells of a merged area read "". |

### `Table.clear()`

```ts theme={null}
clear(options?: TableClearOptions): void
```

Clears text, direct formatting, or both (the default). Merges and the table style stay.

### `Table.getCellOrNullObject()`

```ts theme={null}
getCellOrNullObject(
  rowIndex: number,
  columnIndex: number,
): TableCell & { isNullObject: boolean }
```

A covered cell of a merged area answers for the whole area.

### `Table.getMergedAreas()`

```ts theme={null}
getMergedAreas(): TableCellCollection
```

### `Table.getShape()`

```ts theme={null}
getShape(): Shape
```

### `Table.mergeCells()`

```ts theme={null}
mergeCells(
  rowIndex: number,
  columnIndex: number,
  rowCount: number,
  columnCount: number,
): void
```

## `TableRow`

`PowerPoint.TableRow`.

Import from `@reductoai/pptx/officejs`.

### TableRow properties

| Name | Type | Description |
| - | - | - |
| `currentHeight` | `number` | read-only |
| `height` | `number` | Height in points, as authored; PowerPoint grows a row to fit its text when it opens the deck. |
| `rowIndex` | `number` | read-only |

### `TableRow.delete()`

```ts theme={null}
delete(): void
```

## `TableColumn`

`PowerPoint.TableColumn`.

Import from `@reductoai/pptx/officejs`.

### TableColumn properties

| Name | Type | Description |
| - | - | - |
| `columnIndex` | `number` | read-only |
| `width` | `number` | |

### `TableColumn.delete()`

```ts theme={null}
delete(): void
```

## `TableCell`

`PowerPoint.TableCell`. A covered cell of a merged area answers for the area's top-left cell.

Import from `@reductoai/pptx/officejs`.

### TableCell properties

| Name | Type | Description |
| - | - | - |
| `borders` | `Borders` | read-only |
| `fill` | `ShapeFill` | read-only |
| `margins` | `Margins` | read-only |
| `textFrame` | `TextFrame` | read-only Headless extension: the cell text as a TextFrame, for per-run formatting. |
| `columnCount` | `number` | read-only |
| `columnIndex` | `number` | read-only |
| `font` | `ShapeFont` | read-only |
| `horizontalAlignment` | `ParagraphHorizontalAlignment \| null` | |
| `id` | `string` | read-only |
| `indentLevel` | `number \| null` | |
| `rowCount` | `number` | read-only |
| `rowIndex` | `number` | read-only |
| `text` | `string` | |
| `textRuns` | `TextRun[]` | |
| `verticalAlignment` | `TextVerticalAlignment` | |

### `TableCell.resize()`

```ts theme={null}
resize(rowCount: number, columnCount: number): void
```

Makes the cell span `rowCount` rows and `columnCount` columns from where it starts.

### `TableCell.split()`

```ts theme={null}
split(rowCount: number, columnCount: number): void
```

Splits the cell into a grid of `rowCount` x `columnCount` cells, as PowerPoint's Split Cells.

## `TableAddOptions`

Import from `@reductoai/pptx/officejs`.

| Name | Type | Description |
| - | - | - |
| `columns?` | `TableColumnProperties[]` | |
| `height?` | `number` | |
| `left?` | `number` | |
| `mergedAreas?` | `TableMergedAreaProperties[]` | |
| `rows?` | `TableRowProperties[]` | |
| `specificCellProperties?` | `TableCellProperties[][]` | |
| `style?` | `TableStyleName` | |
| `top?` | `number` | |
| `uniformCellProperties?` | `TableCellProperties` | |
| `values?` | `string[][]` | |
| `width?` | `number` | |
