# TableCollection Class

> TableCollection class in the TX Sheet Control .NET API: Worksheet-bound real Excel tables with workbook-unique names and stable identities.

- **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)
- **Inherits:** `TXTextControl.TXSheetControl.Server.DocumentObject`
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > TableCollection Class
- **907 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tablecollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tablecollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tablecollection/llms-full.txt

---

Worksheet-bound real Excel tables with workbook-unique names and stable identities.

### Syntax

```csharp
public class TableCollection
```

### Members

#### Methods

| Method | Description |
|---|---|
| [AddAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tablecollection/addasync-method/llms-full.txt) | Creates an operational table; omitted columns are derived from its header cells. |
| [GetAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tablecollection/getasync-method/llms-full.txt) | Finds a case-insensitive named table and binds its stable identity to this sheet. |
| [ListAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tablecollection/listasync-method/llms-full.txt) | Returns detached operational table definitions. |

### Examples

Build a small report using this document API and return its PDF bytes. Pass a live control with a fresh workbook; the caller owns its lifetime.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<byte[]> CreateTableCollectionReportAsync(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 });
    await table.SetColumnAsync("Amount", new TableColumnOptions { Formula = "=[@Quantity]*[@UnitPrice]" });
    await sheet.Range("C8:D9").FormatAsync(new { numberFormatCode = "#,##0.00", fontFamily = "Liberation Sans", fontSize = 11 });
    return await control.SaveAsync(StreamType.PDF);
}
```

### 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

- [TableCollection.AddAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tablecollection/addasync-method/llms-full.txt): TableCollection.AddAsync method in the TX Sheet Control .NET API: Creates an operational table; omitted columns are derived from its header cells.
- [TableCollection.GetAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tablecollection/getasync-method/llms-full.txt): TableCollection.GetAsync method in the TX Sheet Control .NET API: Finds a case-insensitive named table and binds its stable identity to this sheet.
- [TableCollection.ListAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tablecollection/listasync-method/llms-full.txt): TableCollection.ListAsync method in the TX Sheet Control .NET API: Returns detached operational table definitions. Includes the syntax and a C# example.

---

## Nearby

- **Previous:** [Table.UpdateAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/table/updateasync-method/llms-full.txt)
- **Next:** [TableCollection.AddAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tablecollection/addasync-method/llms-full.txt)
