# TableDefinition Interface

> TableDefinition interface in the TX Sheet Control TypeScript API for the browser: Operational Excel table; range includes its header and optional totals row.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > TableDefinition Interface
- **931 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/llms-full.txt

---

Operational Excel table; range includes its header and optional totals row.

Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

Type-only declaration; it is not a JavaScript runtime constructor.

### Members

#### Properties

| Property | Description |
|---|---|
| [columns](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/columns-property/llms-full.txt) | The columns value of TableDefinition. |
| [emphasizeFirstColumn](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/emphasizefirstcolumn-property/llms-full.txt) | The emphasizeFirstColumn value of TableDefinition. |
| [emphasizeLastColumn](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/emphasizelastcolumn-property/llms-full.txt) | The emphasizeLastColumn value of TableDefinition. |
| [hasFilterButtons](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/hasfilterbuttons-property/llms-full.txt) | The hasFilterButtons value of TableDefinition. |
| [hasHeaderRow](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/hasheaderrow-property/llms-full.txt) | The hasHeaderRow value of TableDefinition. |
| [hasTotalsRow](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/hastotalsrow-property/llms-full.txt) | The hasTotalsRow value of TableDefinition. |
| [id](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/id-property/llms-full.txt) | The id value of TableDefinition. |
| [name](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/name-property/llms-full.txt) | The name value of TableDefinition. |
| [range](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/range-property/llms-full.txt) | The range value of TableDefinition. |
| [shouldAutoExpand](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/shouldautoexpand-property/llms-full.txt) | The shouldAutoExpand value of TableDefinition. |
| [showColumnStripes](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/showcolumnstripes-property/llms-full.txt) | The showColumnStripes value of TableDefinition. |
| [showRowStripes](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/showrowstripes-property/llms-full.txt) | The showRowStripes value of TableDefinition. |
| [style](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/style-property/llms-full.txt) | The style value of TableDefinition. |
| [customStyle](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/customstyle-property/llms-full.txt) | A named sparse table recipe. |

### Examples

Create sample data and obtain this detached result from the owning document. Return the selected data to the report or application UI.

```typescript
import type { Workbook } from '@txtextcontrol/tx-sheet-control';

function createTableDefinitionReport(book: Workbook) {
    const sheet = book.sheets.at(0);
    sheet.range('A7:D9').setValues([
        ['Description', 'Quantity', 'UnitPrice', 'Amount'],
        ['Consulting', 3, 120, 360],
        ['Training', 2, 90, 180],
    ]);

    const table = sheet.tables.add('InvoiceLines', 'A7:D9', {
        style: 'TableStyleMedium2',
        hasHeaderRow: true,
        showRowStripes: true,
    });

    const result = table.snapshot;
    return result;
}
```

### See Also

- [TypeScript Browser Editor API](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/llms-full.txt)
- [Tables](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/tables/llms-full.txt)

---

## In This Section

- [TableDefinition.columns Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/columns-property/llms-full.txt): TableDefinition.columns property in the TX Sheet Control TypeScript API for the browser, with its type TableColumnDefinition[] and a TypeScript example.
- [TableDefinition.customStyle Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/customstyle-property/llms-full.txt): TableDefinition.customStyle property in the browser TypeScript API, with its type TableDefinition['customStyle'] and a TypeScript example.
- [TableDefinition.emphasizeFirstColumn Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/emphasizefirstcolumn-property/llms-full.txt): TableDefinition.emphasizeFirstColumn property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [TableDefinition.emphasizeLastColumn Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/emphasizelastcolumn-property/llms-full.txt): TableDefinition.emphasizeLastColumn property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [TableDefinition.hasFilterButtons Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/hasfilterbuttons-property/llms-full.txt): TableDefinition.hasFilterButtons property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [TableDefinition.hasHeaderRow Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/hasheaderrow-property/llms-full.txt): TableDefinition.hasHeaderRow property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [TableDefinition.hasTotalsRow Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/hastotalsrow-property/llms-full.txt): TableDefinition.hasTotalsRow property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [TableDefinition.id Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/id-property/llms-full.txt): TableDefinition.id property in the TX Sheet Control TypeScript API for the browser, with its type string and a TypeScript example.
- [TableDefinition.name Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/name-property/llms-full.txt): TableDefinition.name property in the TX Sheet Control TypeScript API for the browser, with its type string and a TypeScript example.
- [TableDefinition.range Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/range-property/llms-full.txt): TableDefinition.range property in the TX Sheet Control TypeScript API for the browser, with its type string and a TypeScript example.
- [TableDefinition.shouldAutoExpand Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/shouldautoexpand-property/llms-full.txt): TableDefinition.shouldAutoExpand property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [TableDefinition.showColumnStripes Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/showcolumnstripes-property/llms-full.txt): TableDefinition.showColumnStripes property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [TableDefinition.showRowStripes Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/showrowstripes-property/llms-full.txt): TableDefinition.showRowStripes property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.
- [TableDefinition.style Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/style-property/llms-full.txt): TableDefinition.style property in the TX Sheet Control TypeScript API for the browser, with its type string and a TypeScript example.

---

## Nearby

- **Previous:** [TableColumnDefinition.totalsLabel Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tablecolumndefinition/totalslabel-property/llms-full.txt)
- **Next:** [TableDefinition.columns Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/tabledefinition/columns-property/llms-full.txt)
