# WorkbookCommand Class

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

---

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

### Syntax

```csharp
public class WorkbookCommand
```

Interfaces: `IEquatable<WorkbookCommand>`.

### Members

#### Constructors

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

#### Properties

| Property | Description |
|---|---|
| [Args](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookcommand/args-property/llms-full.txt) |  |
| [Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookcommand/method-property/llms-full.txt) |  |

### Examples

Create a working document workflow using WorkbookCommand. Return the generated document or application data to the caller.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<byte[]> BuildWorkbookCommandExampleAsync(ServerSheetControl control)
{
    await control.BatchAsync([new WorkbookCommand("setCell", ["A1", "October invoice"]), new WorkbookCommand("setCell", ["B8", 120]), new WorkbookCommand("setCell", ["B9", 80]), new WorkbookCommand("setCell", ["B10", "=SUM(B8:B9)"])]);

    var sheet = await control.Workbook.Sheets.AtAsync(0);
    await sheet.Cell("A1").FormatAsync(new { fontFamily = "Liberation Sans", fontSize = 16, bold = true, textColor = "#ffffff", fillColor = "#163b63" });
    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

- [WorkbookCommand.Args Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookcommand/args-property/llms-full.txt): WorkbookCommand.Args property in the TX Sheet Control .NET API, with its syntax, its type object?[], a C# example and remarks on awaiting tasks and handles.
- [WorkbookCommand Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookcommand/constructor/llms-full.txt): WorkbookCommand constructor in the TX Sheet Control .NET API, with its syntax, the parameters Method and Args and a C# example.
- [WorkbookCommand.Method Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookcommand/method-property/llms-full.txt): WorkbookCommand.Method 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:** [WorkbookBatch.Update Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/update-method/llms-full.txt)
- **Next:** [WorkbookCommand Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookcommand/constructor/llms-full.txt)
