# DocumentObject Class

> DocumentObject class in the TX Sheet Control .NET API: Base for sheet-bound handles. Methods perform async I/O; creating cell/range handles performs none.

- **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)
- **Derived:** `TXTextControl.TXSheetControl.Server.Analytics`, `TXTextControl.TXSheetControl.Server.Calculation`, `TXTextControl.TXSheetControl.Server.Chart`, `TXTextControl.TXSheetControl.Server.ChartCollection`, `TXTextControl.TXSheetControl.Server.Comments`, `TXTextControl.TXSheetControl.Server.Dashboard`, `TXTextControl.TXSheetControl.Server.DashboardCollection`, `TXTextControl.TXSheetControl.Server.Dimension`, `TXTextControl.TXSheetControl.Server.DimensionCollection`, `TXTextControl.TXSheetControl.Server.Drawing`, `TXTextControl.TXSheetControl.Server.DrawingCollection`, `TXTextControl.TXSheetControl.Server.DrawingGroup`, `TXTextControl.TXSheetControl.Server.NameCollection`, `TXTextControl.TXSheetControl.Server.PivotTable`, `TXTextControl.TXSheetControl.Server.PivotTableCollection`, `TXTextControl.TXSheetControl.Server.Protection`, `TXTextControl.TXSheetControl.Server.Range`, `TXTextControl.TXSheetControl.Server.Search`, `TXTextControl.TXSheetControl.Server.SheetCollection`, `TXTextControl.TXSheetControl.Server.SheetPrint`, `TXTextControl.TXSheetControl.Server.SheetView`, `TXTextControl.TXSheetControl.Server.Table`, `TXTextControl.TXSheetControl.Server.TableCollection`, `TXTextControl.TXSheetControl.Server.Validation`, `TXTextControl.TXSheetControl.Server.Worksheet`
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > DocumentObject Class
- **673 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentobject/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentobject/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentobject/llms-full.txt

---

Base for sheet-bound handles. Methods perform async I/O; creating cell/range handles performs none.

### Syntax

```csharp
public abstract class DocumentObject
```

### Members

#### Methods

| Method | Description |
|---|---|
| [Command](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentobject/command-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |

### Examples

Use a worksheet cell through its DocumentObject base to queue text and formatting changes in one atomic transaction, then export the visible result.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<byte[]> CreateInvoiceHeadingAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    DocumentObject heading = sheet.Cell("A1");
    await book.BatchAsync(batch =>
    {
        batch.Add(heading.Command("setText", "October invoice"));
        batch.Add(heading.Command("format", 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)
- [Loading and Saving Workbooks](https://docs.textcontrol.com/tx-sheet-control/document-processing/load-save/llms-full.txt)

---

## In This Section

- [DocumentObject.Command Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentobject/command-method/llms-full.txt): DocumentObject.Command method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.

---

## Nearby

- **Previous:** [DimensionCollection.Sheet Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/sheet-property/llms-full.txt)
- **Next:** [DocumentObject.Command Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentobject/command-method/llms-full.txt)
