# SheetCollection Class

> SheetCollection class in the TX Sheet Control .NET API: Worksheet-scoped server API contract; requests retain document identity and cancellation semantics.

- **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 > SheetCollection Class
- **869 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/llms-full.txt

---

Worksheet-scoped server API contract; requests retain document identity and cancellation semantics.

### Syntax

```csharp
public class SheetCollection
```

### Members

#### Methods

| Method | Description |
|---|---|
| [AddAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/addasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [AtAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/atasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [FindAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/findasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetAllAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/getallasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/getasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetByIdAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/getbyidasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetCountAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/getcountasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [RemoveAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/removeasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |

### 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[]> CreateSheetCollectionReportAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    var invoice = await book.Sheets.AddAsync("InvoiceDemo");
    await invoice.Cell("A1").SetTextAsync("Invoice");

    var sheetCollection = book.Sheets;
    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)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)

---

## In This Section

- [SheetCollection.AddAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/addasync-method/llms-full.txt): SheetCollection.AddAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [SheetCollection.AtAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/atasync-method/llms-full.txt): SheetCollection.AtAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [SheetCollection.FindAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/findasync-method/llms-full.txt): SheetCollection.FindAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [SheetCollection.GetAllAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/getallasync-method/llms-full.txt): SheetCollection.GetAllAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [SheetCollection.GetAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/getasync-method/llms-full.txt): SheetCollection.GetAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [SheetCollection.GetByIdAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/getbyidasync-method/llms-full.txt): SheetCollection.GetByIdAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [SheetCollection.GetCountAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/getcountasync-method/llms-full.txt): SheetCollection.GetCountAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [SheetCollection.RemoveAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/removeasync-method/llms-full.txt): SheetCollection.RemoveAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.

---

## Nearby

- **Previous:** [ServerSheetControlOptions.UserName Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontroloptions/username-property/llms-full.txt)
- **Next:** [SheetCollection.AddAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetcollection/addasync-method/llms-full.txt)
