# ServerSheetControl Class

> ServerSheetControl class in the TX Sheet Control .NET API: Owns an independent spreadsheet document with asynchronous editing, calculation, loading and saving.

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

---

Owns an independent spreadsheet document with asynchronous editing, calculation, loading and saving.

### Syntax

```csharp
public class ServerSheetControl
```

Interfaces: `IAsyncDisposable`.

### Members

#### Constructors

| Constructor | Description |
|---|---|
| [Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/constructor/llms-full.txt) | Creates a control that owns an independent workbook. |

#### Properties

| Property | Description |
|---|---|
| [Events](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/events-property/llms-full.txt) |  |
| [LastPdfPageCount](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/lastpdfpagecount-property/llms-full.txt) |  |
| [LicenseInfo](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/licenseinfo-property/llms-full.txt) | Read-only signed customer information and current trial validity, including after expiry. |
| [Workbook](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/workbook-property/llms-full.txt) |  |

#### Methods

| Method | Description |
|---|---|
| [BatchAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/batchasync-method/llms-full.txt) | Collects synchronous workbook operations and applies them as one atomic undoable transaction. |
| [CreateSession](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/createsession-method/llms-full.txt) | Creates an independent document with its own workbook contents and edit history. |
| [DisposeAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/disposeasync-method/llms-full.txt) | Releases this document and its resources. Dispose documents created from it first. |
| [GetFontCatalogAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/getfontcatalogasync-method/llms-full.txt) | Scans the deployed Fonts folder and returns the catalog used by PDF rendering. |
| [GetFontFileAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/getfontfileasync-method/llms-full.txt) | Reads a catalogued face for HTTP hosting, using the same bytes as PDF export. |
| [GetPrintLayoutAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/getprintlayoutasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetUserNameAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/getusernameasync-method/llms-full.txt) | Reads the author name used for new comments. |
| [GetWarningsAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/getwarningsasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetXlsxWarningsAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/getxlsxwarningsasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [LoadAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/loadasync-method/llms-full.txt) | Loads workbook or UTF-8 CSV/XML/JSON tabular bytes atomically. Raises Loading once and Loaded only after replacement succeeds. |
| [LoadTextAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/loadtextasync-method/llms-full.txt) | Loads CSV, tabular XML or tabular JSON text. Data belongs in this first argument; options contain configuration only. |
| [MergeAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/mergeasync-method/llms-full.txt) | Merges application data into an isolated document snapshot before replacing the current workbook. |
| [RefreshFontsAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/refreshfontsasync-method/llms-full.txt) | Re-reads font files, including replacements whose timestamps were preserved. |
| [SaveAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/saveasync-method/llms-full.txt) | Saves an isolated revision to bytes. Saving is cancellable; Saved follows successful byte generation. |
| [SaveTextAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/savetextasync-method/llms-full.txt) | Saves one worksheet's CSV, tabular XML or tabular JSON as a string, with the same snapshot, limits and events as SaveAsync. |
| [SetPrintContextAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/setprintcontextasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [SetUserNameAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/setusernameasync-method/llms-full.txt) | Sets the current comment author; a simple userName string is sufficient. |

### Examples

Create and format a complete invoice before using this processing API. Return document bytes, operation metadata or notifications to the application; dispose owned controls after processing.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<byte[]> CreateInvoiceReportAsync()
{
    await using var control = new ServerSheetControl();
    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 sheet.Cell("A1").SetTextAsync("October invoice");
    await sheet.Cell("A1").FormatAsync(new { fontFamily = "Liberation Sans", fontSize = 16, bold = true, textColor = "#ffffff", fillColor = "#163b63" });
    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)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)

---

## In This Section

- [ServerSheetControl.BatchAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/batchasync-method/llms-full.txt): ServerSheetControl.BatchAsync method in the .NET API: Collects synchronous workbook operations and applies them as one atomic undoable transaction.
- [ServerSheetControl Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/constructor/llms-full.txt): ServerSheetControl constructor in the TX Sheet Control .NET API: Creates a control that owns an independent workbook. Includes the syntax and a C# example.
- [ServerSheetControl.CreateSession Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/createsession-method/llms-full.txt): ServerSheetControl.CreateSession method in the TX Sheet Control .NET API: Creates an independent document with its own workbook contents and edit history.
- [ServerSheetControl.DisposeAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/disposeasync-method/llms-full.txt): ServerSheetControl.DisposeAsync method in the TX Sheet Control .NET API: Releases this document and its resources. Dispose documents created from it first.
- [ServerSheetControl.Events Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/events-property/llms-full.txt): ServerSheetControl.Events property in the TX Sheet Control .NET API, with its syntax, its type WorkbookEvents and a C# example.
- [ServerSheetControl.GetFontCatalogAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/getfontcatalogasync-method/llms-full.txt): ServerSheetControl.GetFontCatalogAsync method in the TX Sheet Control .NET API: Scans the deployed Fonts folder and returns the catalog used by PDF rendering.
- [ServerSheetControl.GetFontFileAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/getfontfileasync-method/llms-full.txt): ServerSheetControl.GetFontFileAsync method in the TX Sheet Control .NET API: Reads a catalogued face for HTTP hosting, using the same bytes as PDF export.
- [ServerSheetControl.GetPrintLayoutAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/getprintlayoutasync-method/llms-full.txt): ServerSheetControl.GetPrintLayoutAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [ServerSheetControl.GetUserNameAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/getusernameasync-method/llms-full.txt): ServerSheetControl.GetUserNameAsync method in the TX Sheet Control .NET API: Reads the author name used for new comments.
- [ServerSheetControl.GetWarningsAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/getwarningsasync-method/llms-full.txt): ServerSheetControl.GetWarningsAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [ServerSheetControl.GetXlsxWarningsAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/getxlsxwarningsasync-method/llms-full.txt): ServerSheetControl.GetXlsxWarningsAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [ServerSheetControl.LastPdfPageCount Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/lastpdfpagecount-property/llms-full.txt): ServerSheetControl.LastPdfPageCount property in the TX Sheet Control .NET API, with its syntax, its type int? and a C# example.
- [ServerSheetControl.LicenseInfo Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/licenseinfo-property/llms-full.txt): ServerSheetControl.LicenseInfo property in the .NET API: Read-only signed customer information and current trial validity, including after expiry.
- [ServerSheetControl.LoadAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/loadasync-method/llms-full.txt): ServerSheetControl.LoadAsync method in the TX Sheet Control .NET API: Loads workbook or UTF-8 CSV/XML/JSON tabular bytes atomically.
- [ServerSheetControl.LoadTextAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/loadtextasync-method/llms-full.txt): ServerSheetControl.LoadTextAsync method in the TX Sheet Control .NET API: Loads CSV, tabular XML or tabular JSON text. Data belongs in this first argument.
- [ServerSheetControl.MergeAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/mergeasync-method/llms-full.txt): ServerSheetControl.MergeAsync method in the .NET API: Merges application data into an isolated document snapshot before replacing the current workbook.
- [ServerSheetControl.RefreshFontsAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/refreshfontsasync-method/llms-full.txt): ServerSheetControl.RefreshFontsAsync method in the TX Sheet Control .NET API: Re-reads font files, including replacements whose timestamps were preserved.
- [ServerSheetControl.SaveAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/saveasync-method/llms-full.txt): ServerSheetControl.SaveAsync method in the TX Sheet Control .NET API: Saves an isolated revision to bytes. Saving is cancellable.
- [ServerSheetControl.SaveTextAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/savetextasync-method/llms-full.txt): ServerSheetControl.SaveTextAsync method in the TX Sheet Control .NET API, with the return type Task<string> and a C# example.
- [ServerSheetControl.SetPrintContextAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/setprintcontextasync-method/llms-full.txt): ServerSheetControl.SetPrintContextAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [ServerSheetControl.SetUserNameAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/setusernameasync-method/llms-full.txt): ServerSheetControl.SetUserNameAsync method in the TX Sheet Control .NET API: Sets the current comment author; a simple userName string is sufficient.
- [ServerSheetControl.Workbook Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/workbook-property/llms-full.txt): ServerSheetControl.Workbook property in the TX Sheet Control .NET API, with its syntax, its type Workbook and a C# example.

---

## Nearby

- **Previous:** [SearchOptions.UseRegularExpression Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/searchoptions/useregularexpression-property/llms-full.txt)
- **Next:** [ServerSheetControl Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/serversheetcontrol/constructor/llms-full.txt)
