# FSlideTable

- Human documentation: [https://docs.univer.ai/reference/facade/slide-table](https://docs.univer.ai/reference/facade/slide-table)

- Agent Markdown: [https://docs.univer.ai/reference/facade/slide-table.md](https://docs.univer.ai/reference/facade/slide-table.md)

- Requested language: `en-US`

- Content language: `en-US`

- Documentation version: `1.0.0-rc.0`

- Source: [facade/slide-table.mdx](https://github.com/dream-num/documentation/blob/dev/content/reference/facade/slide-table.mdx)

---

Facade object for a slide table element and its table resource.

## Access

Access through:

* [`FSlideTableCell.getTable()`](https://docs.univer.ai/reference/facade/slide-table-cell.md#gettable)
* [`FSlide.insertTable()`](https://docs.univer.ai/reference/facade/slide.md#inserttable)
* [`FSlide.insertTableFromData()`](https://docs.univer.ai/reference/facade/slide.md#inserttablefromdata)
* [`FSlide.getTables()`](https://docs.univer.ai/reference/facade/slide.md#gettables)
* [`FSlide.getTableById()`](https://docs.univer.ai/reference/facade/slide.md#gettablebyid)
* [`FSlide.getTableAt()`](https://docs.univer.ai/reference/facade/slide.md#gettableat)
* [`FSlide.updateTable()`](https://docs.univer.ai/reference/facade/slide.md#updatetable)

## Inheritance

Extends [`FPageElement`](https://docs.univer.ai/reference/facade/page-element.md). Its inherited members are available on this object.

## Example

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const tableInfo = fSlide
  .newTable()
  .setValues([
    ['Quarter', 'Owner', 'Status'],
    ['Q1', 'Sales', 'Done'],
  ])
  .setRows(3)
  .setColumns(4)
  .setColumnWidth(105)
  .setRowHeight(60)
  .setAbsolutePosition(80, 100)
  .setSize(420, 180)
  .build()
const table = fSlide.insertTable(tableInfo)

table?.setCellText(0, 0, 'Name')
table?.setCellText(0, 1, 'Status')
```

## Setup

Register [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) or a preset that includes it. In plugin mode, import `@univerjs-pro/slides-table/facade`. Additional methods below require their listed plugin packages. See [Facade setup](https://docs.univer.ai/guides/slides/getting-started/facade.md).

## `@univerjs-pro/slides-table`

### `FSlideTable.appendColumns`

Append columns to the table.

```typescript
appendColumns(count?: number, width?: number): boolean
```

**Parameters**

* `count` — Optional. Default: `1`. The number of columns to append.
* `width` — Optional. Optional width for new columns.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.appendColumns(2)
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.appendRows`

Append rows to the table.

```typescript
appendRows(count?: number, height?: number): boolean
```

**Parameters**

* `count` — Optional. Default: `1`. The number of rows to append.
* `height` — Optional. Optional height for new rows.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.appendRows(2)
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.clearCellBackground`

Clear cell background for a range.

```typescript
clearCellBackground(range: ISlideTableCellRange): boolean
```

**Parameters**

* `range` — Required. The target range.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.clearCellBackground(table.getTableRange())
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.deleteColumns`

Delete columns from the table.

```typescript
deleteColumns(startColumn: number, count?: number): boolean
```

**Parameters**

* `startColumn` — Required. The first column to delete.
* `count` — Optional. Default: `1`. The number of columns to delete.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.deleteColumns(1, 2)
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.deleteRows`

Delete rows from the table.

```typescript
deleteRows(startRow: number, count?: number): boolean
```

**Parameters**

* `startRow` — Required. The first row to delete.
* `count` — Optional. Default: `1`. The number of rows to delete.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.deleteRows(1, 2)
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.describe`

Return a human-readable table description with sample rows.

```typescript
describe(): ISlideTableDescription
```

**Returns**

The table description.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)
const tables = fSlide.getTables()
console.log(tables[0]?.describe())
```

**Types:** [`ISlideTableDescription`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.distributeColumns`

Distribute column widths evenly.

```typescript
distributeColumns(startColumn?: number, count?: number): boolean
```

**Parameters**

* `startColumn` — Optional. Default: `0`. The first column.
* `count` — Optional. Default: `this.getColumnCount()`. The number of columns.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.distributeColumns()
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.distributeRows`

Distribute row heights evenly.

```typescript
distributeRows(startRow?: number, count?: number): boolean
```

**Parameters**

* `startRow` — Optional. Default: `0`. The first row.
* `count` — Optional. Default: `this.getRowCount()`. The number of rows.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.distributeRows()
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.getCell`

Return a cell facade by row and column.

```typescript
getCell(row: number, column: number): FSlideTableCell | null
```

**Parameters**

* `row` — Required. The zero-based row index.
* `column` — Required. The zero-based column index.

**Returns**

The cell facade, or `null` when it does not exist.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTables()[0]
if (table) {
  const cell = table.getCell(0, 0)
  console.log(cell)
}
```

**Types:** [`FSlideTableCell`](https://docs.univer.ai/reference/facade/slide-table-cell.md)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.getCellData`

Return raw cell data by row and column.

```typescript
getCellData(row: number, column: number): ISlideTableCell | null
```

**Parameters**

* `row` — Required. The zero-based row index.
* `column` — Required. The zero-based column index.

**Returns**

The cell data, or `null` when it does not exist.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTables()[0]
if (table) {
  const cellData = table.getCellData(0, 0)
  console.log(cellData)
}
```

**Types:** [`ISlideTableCell`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.getCellRange`

Return a one-cell range.

```typescript
getCellRange(row: number, column: number): ISlideTableCellRange
```

**Parameters**

* `row` — Required. The zero-based row index.
* `column` — Required. The zero-based column index.

**Returns**

The cell range.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTables()[0]
if (table) {
  const cellRange = table.getCellRange(0, 0)
  console.log(cellRange)
}
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.getCellRichText`

Returns one cell as a detached rich-text value.

```typescript
getCellRichText(row: number, column: number): RichTextValue | null
```

**Parameters**

* `row` — Required. Zero-based row index.
* `column` — Required. Zero-based column index.

**Returns**

A detached rich-text value, or `null` when the cell is empty.

**Types:** [`RichTextValue`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/docs/data-model/rich-text-builder.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.getCellStyle`

Return cell style by row and column.

```typescript
getCellStyle(row: number, column: number): ISlideTableCellStyle | undefined
```

**Parameters**

* `row` — Required. The zero-based row index.
* `column` — Required. The zero-based column index.

**Returns**

The cell style.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTables()[0]
if (table) {
  const cellStyle = table.getCellStyle(0, 0)
  console.log(cellStyle)
}
```

**Types:** [`ISlideTableCellStyle`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.getCellText`

Return plain text in a cell.

```typescript
getCellText(row: number, column: number): string
```

**Parameters**

* `row` — Required. The zero-based row index.
* `column` — Required. The zero-based column index.

**Returns**

The cell plain text.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTables()[0]
if (table) {
  const cellText = table.getCellText(0, 0)
  console.log(cellText)
}
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.getCellTextData`

Return the raw Univer document data in a cell.

This is an advanced integration escape hatch. Application and agent code should prefer `getCellRichText()`.

```typescript
getCellTextData(row: number, column: number): IDocumentData | undefined
```

**Parameters**

* `row` — Required. The zero-based row index.
* `column` — Required. The zero-based column index.

**Returns**

The rich text document data.

**Examples**

```ts
// Advanced: export the exact document model for lossless storage or migration.
const presentation = univerAPI.getActivePresentation()
if (!presentation) throw new Error('No active presentation')
const slide = presentation.getSlideByIndex(0)
const table = slide.getTableById('status-table')
const textData = table?.getCellTextData(0, 0)
if (textData) console.log(JSON.stringify(textData))
```

**Types:** [`IDocumentData`](https://docs.univer.ai/reference/types/document-data.md)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.getColumnCount`

Return the number of columns.

```typescript
getColumnCount(): number
```

**Returns**

The column count.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)
const tables = fSlide.getTables()
console.log(tables[0]?.getColumnCount())
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.getColumnsRange`

Return a column range.

```typescript
getColumnsRange(startColumn: number, count?: number): ISlideTableCellRange
```

**Parameters**

* `startColumn` — Required. The first column.
* `count` — Optional. Default: `1`. The number of columns.

**Returns**

The column range.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)
const tables = fSlide.getTables()
console.log(tables[0]?.getColumnsRange())
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.getRowCount`

Return the number of rows.

```typescript
getRowCount(): number
```

**Returns**

The row count.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)
const tables = fSlide.getTables()
console.log(tables[0]?.getRowCount())
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.getRowsRange`

Return a row range.

```typescript
getRowsRange(startRow: number, count?: number): ISlideTableCellRange
```

**Parameters**

* `startRow` — Required. The first row.
* `count` — Optional. Default: `1`. The number of rows.

**Returns**

The row range.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)
const tables = fSlide.getTables()
console.log(tables[0]?.getRowsRange())
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.getTableData`

Return the raw table resource snapshot.

```typescript
getTableData(): ISlideTableSnapshot
```

**Returns**

The table resource snapshot.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)
const tables = fSlide.getTables()
console.log(tables[0]?.getTableData())
```

**Types:** [`ISlideTableSnapshot`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.getTableId`

Return the table resource id.

```typescript
getTableId(): string
```

**Returns**

The table resource id.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)
const tables = fSlide.getTables()
console.log(tables[0]?.getTableId())
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.getTableRange`

Return a range covering the whole table.

```typescript
getTableRange(): ISlideTableCellRange
```

**Returns**

The table range.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)
const tables = fSlide.getTables()
console.log(tables[0]?.getTableRange())
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.insertColumnsAfter`

Insert columns after a column.

```typescript
insertColumnsAfter(column: number, count?: number, width?: number): boolean
```

**Parameters**

* `column` — Required. The column index to insert after.
* `count` — Optional. Default: `1`. The number of columns to insert.
* `width` — Optional. Optional width for new columns.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.insertColumnsAfter(0, 1)
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.insertColumnsBefore`

Insert columns before a column.

```typescript
insertColumnsBefore(column: number, count?: number, width?: number): boolean
```

**Parameters**

* `column` — Required. The column index to insert before.
* `count` — Optional. Default: `1`. The number of columns to insert.
* `width` — Optional. Optional width for new columns.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.insertColumnsBefore(1, 2, 96)
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.insertRowsAfter`

Insert rows after a row.

```typescript
insertRowsAfter(row: number, count?: number, height?: number): boolean
```

**Parameters**

* `row` — Required. The row index to insert after.
* `count` — Optional. Default: `1`. The number of rows to insert.
* `height` — Optional. Optional height for new rows.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.insertRowsAfter(0, 1)
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.insertRowsBefore`

Insert rows before a row.

```typescript
insertRowsBefore(row: number, count?: number, height?: number): boolean
```

**Parameters**

* `row` — Required. The row index to insert before.
* `count` — Optional. Default: `1`. The number of rows to insert.
* `height` — Optional. Optional height for new rows.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.insertRowsBefore(1, 2, 32)
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.mergeCells`

Merge a rectangular cell range.

```typescript
mergeCells(range: ISlideTableCellRange): boolean
```

**Parameters**

* `range` — Required. The range to merge.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.mergeCells({
  startRow: 0,
  endRow: 1,
  startColumn: 0,
  endColumn: 1,
})
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.remove`

Remove this table element and resource.

```typescript
remove(): boolean
```

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.remove()
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.resize`

Resize the table grid.

```typescript
resize(rows: number, columns: number): boolean
```

**Parameters**

* `rows` — Required. The target row count.
* `columns` — Required. The target column count.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.resize(5, 4)
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setBorder`

Apply borders to a range.

```typescript
setBorder(range: ISlideTableCellRange, border: ISlideTableBorder, preset?: SlideTableBorderPresetEnum): boolean
```

**Parameters**

* `range` — Required. The target range.
* `border` — Required. The border style.
* `preset` — Optional. Default: `SlideTableBorderPresetEnum.All`. Which borders to apply.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setBorder(
  table.getTableRange(),
  {
    color: '#111827',
    width: 1,
    dash: univerAPI.Enum.SlideTableBorderDashEnum.Dash,
  },
  univerAPI.Enum.SlideTableBorderPresetEnum.Outer,
)
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts) · [`ISlideTableBorder`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts) · [`SlideTableBorderPresetEnum`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setCellBackground`

Set solid background color for a range.

```typescript
setCellBackground(range: ISlideTableCellRange, color: string): boolean
```

**Parameters**

* `range` — Required. The target range.
* `color` — Required. The background color.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setCellBackground(table.getTableRange(), '#F8FAFC')
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setCellFill`

Set cell fill for a range.

```typescript
setCellFill(range: ISlideTableCellRange, fill?: ISlideTableFill): boolean
```

**Parameters**

* `range` — Required. The target range.
* `fill` — Optional. The fill, or `undefined` to clear it.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setCellFill(table.getCellRange(0, 0), {
  type: univerAPI.Enum.SlideTableFillTypeEnum.Solid,
  color: '#E8F1FF',
  alpha: 1,
})
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts) · [`ISlideTableFill`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setCellHorizontalAlign`

Set horizontal text alignment for a range.

```typescript
setCellHorizontalAlign(range: ISlideTableCellRange, horizontalAlign: HorizontalAlign): boolean
```

**Parameters**

* `range` — Required. The target range.
* `horizontalAlign` — Required. The horizontal alignment.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setCellHorizontalAlign(table.getTableRange(), univerAPI.Enum.HorizontalAlign.CENTER)
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts) · [`HorizontalAlign`](https://docs.univer.ai/reference/enums/horizontal-align.md)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setCellRichText`

Replaces one cell with a detached value returned by `univerAPI.newRichText()`.

```typescript
setCellRichText(row: number, column: number, richText: RichTextValue): boolean
```

**Parameters**

* `row` — Required. Zero-based row index.
* `column` — Required. Zero-based column index.
* `richText` — Required. Rich-text value to store.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const text = univerAPI
  .newRichText()
  .align({
    horizontal: univerAPI.Enum.HorizontalAlign.CENTER,
    vertical: univerAPI.Enum.VerticalAlign.MIDDLE,
  })
  .text('Ready')
table.setCellRichText(0, 0, text)
```

**Types:** [`RichTextValue`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/docs/data-model/rich-text-builder.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setCellStyle`

Merge style fields into a cell range.

```typescript
setCellStyle(range: ISlideTableCellRange, style: ISlideTableCellStyle): boolean
```

**Parameters**

* `range` — Required. The target range.
* `style` — Required. The style patch.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setCellStyle(table.getTableRange(), {
  fill: {
    type: univerAPI.Enum.SlideTableFillTypeEnum.Solid,
    color: '#E8F1FF',
    alpha: 1,
  },
  borders: {
    left: {
      color: '#111827',
      width: 1,
      dash: univerAPI.Enum.SlideTableBorderDashEnum.Dash,
    },
  },
  margins: {
    left: 8,
    right: 8,
  },
  verticalAlign: univerAPI.Enum.SlideTableVerticalAlignEnum.Middle,
  textDirection: univerAPI.Enum.SlideTableTextDirectionEnum.Horizontal,
})
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts) · [`ISlideTableCellStyle`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setCellText`

Replace a cell with plain text.

```typescript
setCellText(row: number, column: number, text: string): boolean
```

**Parameters**

* `row` — Required. The row index.
* `column` — Required. The column index.
* `text` — Required. The new text.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setCellText(0, 0, 'Ready')
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setCellTextColor`

Set text color for a range.

```typescript
setCellTextColor(range: ISlideTableCellRange, color: string): boolean
```

**Parameters**

* `range` — Required. The target range.
* `color` — Required. The text color.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setCellTextColor(table.getTableRange(), '#111827')
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setCellTextData`

Replace a cell with raw Univer document data.

This is an advanced integration escape hatch. Application and agent code should prefer `setCellRichText()`.

```typescript
setCellTextData(row: number, column: number, textData: IDocumentData): boolean
```

**Parameters**

* `row` — Required. The row index.
* `column` — Required. The column index.
* `textData` — Required. The rich text document data.

**Returns**

Whether the command succeeded.

**Examples**

```ts
// Advanced: copy exact imported document data without rebuilding its runs and ranges.
const presentation = univerAPI.getActivePresentation()
if (!presentation) throw new Error('No active presentation')
const slide = presentation.getSlideByIndex(0)
const table = slide.getTableById('status-table')
if (!table) throw new Error('Cannot find status table')
const importedTextData = table.getCellTextData(0, 0)
if (!importedTextData) throw new Error('Imported cell data is unavailable')
if (!table.setCellTextData(0, 1, importedTextData)) throw new Error('Cannot restore raw cell data')
```

**Types:** [`IDocumentData`](https://docs.univer.ai/reference/types/document-data.md)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setCellTextDirection`

Set text direction for a range.

```typescript
setCellTextDirection(range: ISlideTableCellRange, textDirection: SlideTableTextDirectionEnum | undefined): boolean
```

**Parameters**

* `range` — Required. The target range.
* `textDirection` — Required. The text direction.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setCellTextDirection(
  table.getTableRange(),
  univerAPI.Enum.SlideTableTextDirectionEnum.Horizontal,
)
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts) · [`SlideTableTextDirectionEnum`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setCellTextFill`

Apply rich text fill to a range.

```typescript
setCellTextFill(range: ISlideTableCellRange, fill?: IDocTextFill): boolean
```

**Parameters**

* `range` — Required. The target range.
* `fill` — Optional. The rich text fill, or `undefined` to clear it.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setCellTextFill(table.getTableRange(), { type: 'solid', color: '#111827', opacity: 1 })
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts) · [`IDocTextFill`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/types/interfaces/i-document-data.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setCellTextStyle`

Apply document text style to a range.

```typescript
setCellTextStyle(range: ISlideTableCellRange, textStyle: ITextStyle): boolean
```

**Parameters**

* `range` — Required. The target range.
* `textStyle` — Required. The document text style patch.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setCellTextStyle(table.getTableRange(), { fs: 14, bl: 1 })
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts) · [`ITextStyle`](https://docs.univer.ai/reference/types/text-style.md)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setCellVerticalAlign`

Set vertical text alignment for a range.

```typescript
setCellVerticalAlign(range: ISlideTableCellRange, verticalAlign: SlideTableVerticalAlignEnum | undefined): boolean
```

**Parameters**

* `range` — Required. The target range.
* `verticalAlign` — Required. The vertical alignment.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setCellVerticalAlign(table.getTableRange(), univerAPI.Enum.SlideTableVerticalAlignEnum.Middle)
```

**Types:** [`ISlideTableCellRange`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts) · [`SlideTableVerticalAlignEnum`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setColumnWidth`

Set one column's width.

```typescript
setColumnWidth(column: number, width: number): boolean
```

**Parameters**

* `column` — Required. The column index.
* `width` — Required. The column width.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setColumnWidth(1, 160)
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setCustom`

Set custom table metadata.

```typescript
setCustom(custom: Record<string, unknown> | null): boolean
```

**Parameters**

* `custom` — Required. Custom metadata, or `null` to clear it.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setCustom({ source: 'agent' })
```

**Types:** [`Record`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setOptions`

Set table style options.

```typescript
setOptions(options: ISlideTableStyleOptions): boolean
```

**Parameters**

* `options` — Required. The table style options.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setOptions({ firstRow: true, bandRow: true })
```

**Types:** [`ISlideTableStyleOptions`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setRowHeight`

Set one row's height.

```typescript
setRowHeight(row: number, height: number): boolean
```

**Parameters**

* `row` — Required. The row index.
* `height` — Required. The row height.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setRowHeight(0, 40)
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setStyleId`

Set the table theme style id. Built-in ids include:
`univerPrimaryPlainGrid`, `univerPrimaryHeader`, `univerPrimaryHeaderBandedRows`,
`univerNeutralPlainGrid`, `univerGreenHeaderBandedRows`, `univerPurpleStrongHeader`;
`univer{Neutral|Primary|Blue|Cyan|Green|Orange|Purple|Pink}LightPlainGrid`,
`univer{Neutral|Primary|Blue|Cyan|Green|Orange|Purple|Pink}LightHeader`,
`univer{Neutral|Primary|Blue|Cyan|Green|Orange|Purple|Pink}LightHeaderBandedRows`;
`univer{Neutral|Primary|Blue|Cyan|Green|Orange|Purple|Pink}MediumStrongHeader`,
`univer{Neutral|Primary|Blue|Cyan|Green|Orange|Purple|Pink}MediumFirstColumn`,
`univer{Neutral|Primary|Blue|Cyan|Green|Orange|Purple|Pink}MediumHeaderFirstColumn`;
`univer{Neutral|Primary|Blue|Cyan|Green|Orange|Purple|Pink}HorizontalLines`,
`univerPrimarySoftGrid`, and `univerNeutralSoftGrid`.

```typescript
setStyleId(styleId: string | null): boolean
```

**Parameters**

* `styleId` — Required. The style id, or `null` to clear it.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setStyleId('univerGreenMediumHeaderFirstColumn')
table.setOptions({
  firstRow: true,
  firstCol: true,
  bandRow: true,
})
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setTableBackground`

Set table background color.

```typescript
setTableBackground(color: string): boolean
```

**Parameters**

* `color` — Required. The background color.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setTableBackground('#F8FAFC')
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setTableBorder`

Apply borders to the whole table.

```typescript
setTableBorder(border: ISlideTableBorder, preset?: SlideTableBorderPresetEnum): boolean
```

**Parameters**

* `border` — Required. The border style.
* `preset` — Optional. Default: `SlideTableBorderPresetEnum.All`. Which borders to apply.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setTableBorder(
  {
    color: '#111827',
    width: 1,
    dash: univerAPI.Enum.SlideTableBorderDashEnum.Solid,
  },
  univerAPI.Enum.SlideTableBorderPresetEnum.All,
)
```

**Types:** [`ISlideTableBorder`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts) · [`SlideTableBorderPresetEnum`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/types.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setTableDescription`

Set the table description.

```typescript
setTableDescription(description: string | null): boolean
```

**Parameters**

* `description` — Required. The description, or `null` to clear it.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setTableDescription('Quarterly status table')
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setTableName`

Set the table name.

```typescript
setTableName(name: string | null): boolean
```

**Parameters**

* `name` — Required. The table name, or `null` to clear it.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setTableName('Status table')
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.setTableStyle`

Apply table-level style settings.

```typescript
setTableStyle(style: ISlideTableFacadeStyle): boolean
```

**Parameters**

* `style` — Required. Table style settings.

**Returns**

Whether every command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.setTableStyle({
  fill: {
    type: univerAPI.Enum.SlideTableFillTypeEnum.Solid,
    color: '#F8FAFC',
    alpha: 1,
  },
  border: {
    color: '#111827',
    width: 1,
    dash: univerAPI.Enum.SlideTableBorderDashEnum.Solid,
  },
  options: {
    firstRow: true,
  },
})
```

**Types:** [`ISlideTableFacadeStyle`](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.toBuilder`

Return a builder initialized from this table.

```typescript
toBuilder(): FSlideTableBuilder
```

**Returns**

A table builder.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
const tableInfo = table
  .toBuilder()
  .setValues([
    ['Quarter', 'Owner', 'Status'],
    ['Q1', 'Sales', 'Done'],
  ])
  .setRows(3)
  .setColumns(4)
  .setColumnWidth(105)
  .setRowHeight(60)
  .setAbsolutePosition(80, 120)
  .setSize(420, 180)
  .build()
fSlide.updateTable(tableInfo)
```

**Types:** [`FSlideTableBuilder`](https://docs.univer.ai/reference/facade/slide-table-builder.md)

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)

### `FSlideTable.unmergeCell`

Unmerge the merged range containing a cell.

```typescript
unmergeCell(row: number, column: number): boolean
```

**Parameters**

* `row` — Required. The row index.
* `column` — Required. The column index.

**Returns**

Whether the command succeeded.

**Examples**

```ts
const fPresentation = univerAPI.getActivePresentation()
const fSlide = fPresentation.getSlideByIndex(0)

const table = fSlide.getTableById('status-table')
table.unmergeCell(0, 0)
```

**Package:** [`@univerjs-pro/slides-table`](https://docs.univer.ai/reference/packages/plugins/univerjs-pro/slides-table.md) · [Type definitions](https://unpkg.com/@univerjs-pro/slides-table@1.0.0-rc.0/lib/types/facade/f-slide-table.d.ts)
