ISheetControl.MergeAsync Method
- Namespace
TXTextControl.TXSheetControl. Server
- Package
TXTextControl.asTXSheetControl. Server TXTextControl.from the private NuGet feed or the supplied NuGet folderTXSheetControl. Api. dll
- Also in
TXTextControl.asTXSheetControl. Blazor TXTextControl.TXSheetControl. Api. dll
Merges application data into this document and returns detached merge metadata.
Syntax
public Task<JsonElement> MergeAsync(object data, object? options = null, CancellationToken cancellationToken = default)
Parameters
| Name | Type | Description |
|---|---|---|
data | object | Serializable application data for the configured merge bindings. |
options | object? | Optional operation settings. |
cancellationToken | CancellationToken | Cancellation before starting the operation, with cooperative cancellation for supported file work. |
Return Value
Task<JsonElement>. The awaited operation result, detached from browser transport.
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("F2").SetValueAsync("Customer");
await control.Workbook.SetMailMergeAsync(new
{
version = 1, bindings = new[] { new { sheetId = sheet.Id, cell = "F2", path = "customer" } },
repeatBlocks = Array.Empty<object>()
});
await control.MergeAsync(new { customer = "Fabrikam" });
Remarks
Await asynchronous operations. Replacement workbook loads invalidate earlier worksheet, cell and range handles. Browser callbacks report completed notifications.