# TableDefinition Class

> TableDefinition class in the TX Sheet Control .NET API: Detached operational Excel table state; its A1 range includes headers and optional totals.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Implements:** `System.IEquatable<TXTextControl.TXSheetControl.Server.TableDefinition>`
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > TableDefinition Class
- **1129 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/llms-full.txt

---

Detached operational Excel table state; its A1 range includes headers and optional totals.

### Syntax

```csharp
public class TableDefinition
```

Interfaces: `IEquatable<TableDefinition>`.

### Members

#### Constructors

| Constructor | Description |
|---|---|
| [Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/constructor/llms-full.txt) |  |

#### Properties

| Property | Description |
|---|---|
| [Columns](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/columns-property/llms-full.txt) |  |
| [EmphasizeFirstColumn](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/emphasizefirstcolumn-property/llms-full.txt) |  |
| [EmphasizeLastColumn](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/emphasizelastcolumn-property/llms-full.txt) |  |
| [HasFilterButtons](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/hasfilterbuttons-property/llms-full.txt) |  |
| [HasHeaderRow](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/hasheaderrow-property/llms-full.txt) |  |
| [HasTotalsRow](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/hastotalsrow-property/llms-full.txt) |  |
| [Id](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/id-property/llms-full.txt) |  |
| [Name](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/name-property/llms-full.txt) |  |
| [Range](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/range-property/llms-full.txt) |  |
| [ShouldAutoExpand](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/shouldautoexpand-property/llms-full.txt) |  |
| [ShowColumnStripes](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/showcolumnstripes-property/llms-full.txt) |  |
| [ShowRowStripes](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/showrowstripes-property/llms-full.txt) |  |
| [Style](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/style-property/llms-full.txt) |  |
| [CustomStyle](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/customstyle-property/llms-full.txt) | Named sparse table formatting recipe. |

### Examples

Obtain TableDefinition from a real document operation. Return the detached result to the calling report, API response or application.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<TableDefinition> ReadReportTableDefinitionAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    await sheet.Range("A7:D9").SetValuesAsync(new object?[][]
    {
        ["Description", "Quantity", "UnitPrice", "Amount"],
        ["Consulting", 3, 120, 360],
        ["Training", 2, 90, 180]
    });

    var table = await sheet.Tables.AddAsync("InvoiceLines", "A7:D9", new TableOptions { Style = "TableStyleMedium2", ShowRowStripes = true });

    var result = await table.GetSnapshotAsync();
    return result;
}
```

### See Also

- [TXTextControl.TXSheetControl.Server Namespace](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/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/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/columns-property/llms-full.txt): TableDefinition.Columns property in the TX Sheet Control .NET API, with its type TableColumnDefinition[] and a C# example.
- [TableDefinition Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/constructor/llms-full.txt): TableDefinition constructor in the TX Sheet Control .NET API, with its syntax, a C# example and remarks on awaiting tasks and handles.
- [TableDefinition.CustomStyle Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/customstyle-property/llms-full.txt): TableDefinition.CustomStyle property in the TX Sheet Control .NET API, with its type System.Text.Json.JsonElement? and a C# example.
- [TableDefinition.EmphasizeFirstColumn Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/emphasizefirstcolumn-property/llms-full.txt): TableDefinition.EmphasizeFirstColumn property in the TX Sheet Control .NET API, with its syntax, its type bool and a C# example.
- [TableDefinition.EmphasizeLastColumn Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/emphasizelastcolumn-property/llms-full.txt): TableDefinition.EmphasizeLastColumn property in the TX Sheet Control .NET API, with its syntax, its type bool and a C# example.
- [TableDefinition.HasFilterButtons Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/hasfilterbuttons-property/llms-full.txt): TableDefinition.HasFilterButtons property in the TX Sheet Control .NET API, with its syntax, its type bool and a C# example.
- [TableDefinition.HasHeaderRow Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/hasheaderrow-property/llms-full.txt): TableDefinition.HasHeaderRow property in the TX Sheet Control .NET API, with its syntax, its type bool and a C# example.
- [TableDefinition.HasTotalsRow Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/hastotalsrow-property/llms-full.txt): TableDefinition.HasTotalsRow property in the TX Sheet Control .NET API, with its syntax, its type bool and a C# example.
- [TableDefinition.Id Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/id-property/llms-full.txt): TableDefinition.Id property in the TX Sheet Control .NET API, with its syntax, its type string, a C# example and remarks on awaiting tasks and handles.
- [TableDefinition.Name Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/name-property/llms-full.txt): TableDefinition.Name property in the TX Sheet Control .NET API, with its syntax, its type string, a C# example and remarks on awaiting tasks and handles.
- [TableDefinition.Range Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/range-property/llms-full.txt): TableDefinition.Range property in the TX Sheet Control .NET API, with its syntax, its type string, a C# example and remarks on awaiting tasks and handles.
- [TableDefinition.ShouldAutoExpand Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/shouldautoexpand-property/llms-full.txt): TableDefinition.ShouldAutoExpand property in the TX Sheet Control .NET API, with its syntax, its type bool and a C# example.
- [TableDefinition.ShowColumnStripes Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/showcolumnstripes-property/llms-full.txt): TableDefinition.ShowColumnStripes property in the TX Sheet Control .NET API, with its syntax, its type bool and a C# example.
- [TableDefinition.ShowRowStripes Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/showrowstripes-property/llms-full.txt): TableDefinition.ShowRowStripes property in the TX Sheet Control .NET API, with its syntax, its type bool and a C# example.
- [TableDefinition.Style Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/style-property/llms-full.txt): TableDefinition.Style property in the TX Sheet Control .NET API, with its syntax, its type string, a C# example and remarks on awaiting tasks and handles.

---

## Nearby

- **Previous:** [TableColumnOptions.TotalsLabel Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tablecolumnoptions/totalslabel-property/llms-full.txt)
- **Next:** [TableDefinition Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/constructor/llms-full.txt)
