SheetCollection Class
- Namespace
TXTextControl.TXSheetControl. Server
- Package
TXTextControl.from the private NuGet feed or the supplied NuGet folderTXSheetControl. Server
- Assembly
TXTextControl.TXSheetControl. Api. dll
- Install
dotnet add package TXTextControl..NET 10 and later.TXSheetControl. Server
- Also in
TXTextControl.asTXSheetControl. Blazor TXTextControl.TXSheetControl. Api. dll
- Inherits
- Document
Object - Sheet
Collection
- Document
Worksheet-scoped server API contract; requests retain document identity and cancellation semantics.
Syntax
public class SheetCollection
Members
Methods
| Method | Description |
|---|---|
| AddAsync | Performs an operation on this document without activating another worksheet. |
| AtAsync | Performs an operation on this document without activating another worksheet. |
| FindAsync | Performs an operation on this document without activating another worksheet. |
| GetAllAsync | Performs an operation on this document without activating another worksheet. |
| GetAsync | Performs an operation on this document without activating another worksheet. |
| GetByIdAsync | Performs an operation on this document without activating another worksheet. |
| GetCountAsync | Performs an operation on this document without activating another worksheet. |
| RemoveAsync | Performs an operation on this document without activating another worksheet. |
Examples
Build a small report using this document API and return its PDF bytes. Pass a live control with a fresh workbook; the caller owns its lifetime.
using TXTextControl.TXSheetControl.Server;
async Task<byte[]> CreateSheetCollectionReportAsync(ServerSheetControl control)
{
var book = control.Workbook;
var sheet = await book.Sheets.AtAsync(0);
var invoice = await book.Sheets.AddAsync("InvoiceDemo");
await invoice.Cell("A1").SetTextAsync("Invoice");
var sheetCollection = book.Sheets;
return await control.SaveAsync(StreamType.PDF);
}