SheetView 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
View
- Document
Freeze and split data coordinates without modifying worksheet dimensions or print pagination.
Syntax
public class SheetView
Members
Methods
| Method | Description |
|---|---|
| FreezeAsync | Freezes the specified counts of data rows and columns; fixed headings remain separate. |
| GetSettingsAsync | Reads pane configuration in zero-based worksheet data coordinates. |
| ResetAsync | Restores a single unfrozen viewport. |
| SplitAsync | Splits the worksheet view after the specified data row and column counts. |
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[]> CreateSheetViewReportAsync(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 sheetView = sheet.Viewport;
await sheetView.FreezeAsync(rows: 1, columns: 1);
return await control.SaveAsync(StreamType.PDF);
}