# ObjectCommand Class

> ObjectCommand class in the TX Sheet Control .NET API: An opaque queued operation created by a worksheet-bound handle. Add it to a WorkbookBatch.

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

---

An opaque queued operation created by a worksheet-bound handle. Add it to a WorkbookBatch.

### Syntax

```csharp
public class ObjectCommand
```

### Members

| Member | Value | Description |
|---|---|---|

### Examples

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

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<byte[]> BuildObjectCommandExampleAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    DocumentObject heading = sheet.Cell("A1");
    ObjectCommand text = heading.Command("setText", "October invoice");
    ObjectCommand format = heading.Command("format", new { fontFamily = "Liberation Sans", fontSize = 16, bold = true, textColor = "#ffffff", fillColor = "#163b63" });
    await book.BatchAsync(batch => { batch.Add(text); batch.Add(format); });
    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)

---

## Nearby

- **Previous:** [NoteBounds.Width Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/notebounds/width-property/llms-full.txt)
- **Next:** [ObjectSize Class](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/objectsize/llms-full.txt)
