BlazorSheetControl Class
- Namespace
TXTextControl.TXSheetControl. Blazor
- Package
TXTextControl.from the private NuGet feed or the supplied NuGet folderTXSheetControl. Blazor
- Assembly
TXTextControl.TXSheetControl. Blazor. dll
- Install
dotnet add package TXTextControl..NET 10 and later.TXSheetControl. Blazor
- Implements
- IAsync
Disposable , ISheetControl
Browser document host implementing the same typed Workbook API as ServerSheetControl. Use after the component Ready event.
Syntax
public class BlazorSheetControl
Members
| Member | Description |
|---|---|
| BatchAsync | Applies collected workbook commands as one atomic undoable transaction. |
| DisposeAsync | Releases the editor, its event subscriptions and this instance's callback reference. Safe to call repeatedly. |
| Events | Shared completed workbook notifications. Browser events cannot synchronously cancel an edit. |
| GetLicenseInfoAsync | Reads current signed license metadata, including the current trial deadline state. |
| GetPrintLayoutAsync | Calculates detached print layout metadata for the selected worksheet. |
| GetSelectionAsync | Reads detached current screen selection. |
| GetUserNameAsync | Reads the current comment author using the same signature as ServerSheetControl. |
| GetWarningsAsync | Reads text from retained XLSX conversion notices. |
| GetXlsxWarningsAsync | Reads detached XLSX conversion notices from the browser document. |
| LoadAsync | Loads copied binary input atomically. The caller retains ownership of the byte array. |
| LoadTextAsync | Loads UTF-8 CSV, XML or JSON text with the same reusable options as the server API. |
| MergeAsync | Merges application data into this document through the shared engine. |
| SaveAsync | Exports caller-owned bytes through Blazor streaming. PDF, XLSX, ODS and TXWB use the shared document engine. |
| SaveTextAsync | Exports CSV, XML or JSON text. Binary formats require SaveAsync. |
| SelectRangeAsync | Selects a worksheet-bound A1 range and scrolls it into view. Foreign handles are rejected. |
| SetPrintContextAsync | Sets print-field context for subsequent exports. |
| SetUserNameAsync | Sets a nonempty comment author for subsequent comments. |
| Workbook | Shared typed document API. Handles become stale after loading a replacement workbook. |
Examples
The control variable is the host received by Ready. File examples use caller-provided xlsxBytes.
var sheet = await control.Workbook.Sheets.AtAsync(0);
await sheet.Cell("A1").SetValueAsync("Orders");
await sheet.Cell("B2").SetValueAsync(8);
await sheet.Cell("D2").SetFormulaAsync("=B2*12");
Remarks
Use the component only after interactive rendering. Browser document operations execute in the editor through JavaScript interop. Completed notifications cannot synchronously cancel edits.