DimensionCollection 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 - Dimension
Collection
- Document
Worksheet-scoped server API contract; requests retain document identity and cancellation semantics.
Syntax
public class DimensionCollection
Members
Properties
| Property | Description |
|---|---|
| Sheet |
Methods
| Method | Description |
|---|---|
| At | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| Get | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| GetAllAsync | Performs an operation on this document without activating another worksheet. |
| GetCountAsync | Performs an operation on this document without activating another worksheet. |
| InsertAsync | Performs an operation on this document without activating another worksheet. |
| RemoveAsync | Deletes count dimensions starting at a zero-based index. |
| SetHiddenAsync | Hides or reveals consecutive rows or columns in one undoable edit, retaining stored sizes. Worksheet protection applies. |
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[]> CreateDimensionCollectionReportAsync(ServerSheetControl control)
{
var book = control.Workbook;
var sheet = await book.Sheets.AtAsync(0);
await sheet.Cell("B8").SetValueAsync(120);
await sheet.Cell("B9").SetValueAsync(80);
await sheet.Cell("B10").SetFormulaAsync("=SUM(B8:B9)");
var dimensionCollection = sheet.Rows;
await dimensionCollection.At(0).SetHeightAsync(new { points = 28 });
return await control.SaveAsync(StreamType.PDF);
}