# WorkbookBatch Class

> WorkbookBatch class in the TX Sheet Control .NET API: Collects operations locally, then sends one atomic request. Reads occur before creating a batch.

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

---

Collects operations locally, then sends one atomic request. Reads occur before creating a batch.

### Syntax

```csharp
public class WorkbookBatch
```

### Members

#### Methods

| Method | Description |
|---|---|
| [Add](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/add-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| [Clear](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/clear-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| [ConfigurePrint](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/configureprint-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| [Format](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/format-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| [FormatText](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/formattext-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| [SetFormula](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/setformula-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| [SetInput](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/setinput-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| [SetRichText](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/setrichtext-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| [SetText](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/settext-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| [SetValue](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/setvalue-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| [SetValues](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/setvalues-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| [Update](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/update-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |

### Examples

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

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<byte[]> BuildWorkbookBatchExampleAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    var title = sheet.Cell("A1");
    await book.BatchAsync(batch =>
    {
        batch.SetText(title, "October invoice");
        batch.Format(title, new { fontFamily = "Liberation Sans", fontSize = 16, bold = true, textColor = "#ffffff", fillColor = "#163b63" });
        batch.SetValues(sheet.Range("B8:B9"), [[120], [80]]);
        batch.SetFormula(sheet.Cell("B10"), "=SUM(B8:B9)");
        batch.Format(sheet.Range("B8:B10"), 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

- [WorkbookBatch.Add Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/add-method/llms-full.txt): WorkbookBatch.Add method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.
- [WorkbookBatch.Clear Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/clear-method/llms-full.txt): WorkbookBatch.Clear method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.
- [WorkbookBatch.ConfigurePrint Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/configureprint-method/llms-full.txt): WorkbookBatch.ConfigurePrint method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.
- [WorkbookBatch.Format Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/format-method/llms-full.txt): WorkbookBatch.Format method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.
- [WorkbookBatch.FormatText Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/formattext-method/llms-full.txt): WorkbookBatch.FormatText method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.
- [WorkbookBatch.SetFormula Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/setformula-method/llms-full.txt): WorkbookBatch.SetFormula method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.
- [WorkbookBatch.SetInput Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/setinput-method/llms-full.txt): WorkbookBatch.SetInput method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.
- [WorkbookBatch.SetRichText Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/setrichtext-method/llms-full.txt): WorkbookBatch.SetRichText method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.
- [WorkbookBatch.SetText Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/settext-method/llms-full.txt): WorkbookBatch.SetText method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.
- [WorkbookBatch.SetValue Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/setvalue-method/llms-full.txt): WorkbookBatch.SetValue method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.
- [WorkbookBatch.SetValues Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/setvalues-method/llms-full.txt): WorkbookBatch.SetValues method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.
- [WorkbookBatch.Update Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/update-method/llms-full.txt): WorkbookBatch.Update method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.

---

## Nearby

- **Previous:** [Workbook.UpdateConditionalRuleAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbook/updateconditionalruleasync-method/llms-full.txt)
- **Next:** [WorkbookBatch.Add Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/workbookbatch/add-method/llms-full.txt)
