BlazorSheetControl.SelectRangeAsync Method
- Namespace
TXTextControl.TXSheetControl. Blazor
- Package
TXTextControl.asTXSheetControl. Blazor TXTextControl.from the private NuGet feed or the supplied NuGet folderTXSheetControl. Blazor. dll
Selects a worksheet-bound A1 range and scrolls it into view. Foreign handles are rejected.
Syntax
public Task SelectRangeAsync(Worksheet sheet, string address, CancellationToken cancellationToken = default)
Parameters
| Name | Type | Description |
|---|---|---|
sheet | Worksheet | The sheet supplied to this operation. |
address | string | The address supplied to this operation. |
cancellationToken | CancellationToken | Cancellation before starting the operation, with cooperative cancellation for supported file work. |
Return Value
Task. Completes after the operation.
Exceptions
API failures throw ServerSheetControlException with a code. A canceled operation throws OperationCanceledException. Browser filesystem overloads and synchronous C# cell renderers throw PlatformNotSupportedException.
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 control.SelectRangeAsync(sheet, "A1:D3");
Remarks
Await asynchronous operations. Replacement workbook loads invalidate earlier worksheet, cell and range handles. Browser callbacks report completed notifications.