# BlazorSheetControl.LoadTextAsync Method

> BlazorSheetControl.LoadTextAsync method in the TX Sheet Control .NET API: Loads UTF-8 CSV, XML or JSON text with the same reusable options as the server API.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Method
- **Namespace:** `TXTextControl.TXSheetControl.Blazor`
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Blazor.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Blazor > BlazorSheetControl > BlazorSheetControl.LoadTextAsync Method
- **562 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/blazorsheetcontrol/loadtextasync-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/blazorsheetcontrol/loadtextasync-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/blazorsheetcontrol/loadtextasync-method/llms-full.txt

---

Loads UTF-8 CSV, XML or JSON text with the same reusable options as the server API.

### Syntax

```csharp
public Task<LoadResult> LoadTextAsync(string text, StreamType streamType, LoadOptions? options = null, CancellationToken cancellationToken = default)
```

### Parameters

| Name | Type | Description |
|---|---|---|
| `text` | `string` | UTF-8 CSV, XML or JSON text. |
| `streamType` | `StreamType` | Document or text format. PDF is save-only. |
| `options` | `LoadOptions?` | Optional operation settings. |
| `cancellationToken` | `CancellationToken` | Cancellation before starting the operation, with cooperative cancellation for supported file work. |

### Return Value

`Task<LoadResult>`. 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`.

```csharp
await control.LoadTextAsync("Item,Quantity\nNotebook,5", StreamType.CSV);
var sheet = await control.Workbook.Sheets.AtAsync(0);
await sheet.Cell("C2").SetFormulaAsync("=B2*12");
```

### Remarks

Await asynchronous operations. Replacement workbook loads invalidate earlier worksheet, cell and range handles. Browser callbacks report completed notifications.

### See Also

- [BlazorSheetControl](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/blazorsheetcontrol/llms-full.txt).

---

## Nearby

- **Previous:** [BlazorSheetControl.LoadAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/blazorsheetcontrol/loadasync-method/llms-full.txt)
- **Next:** [BlazorSheetControl.MergeAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/blazorsheetcontrol/mergeasync-method/llms-full.txt)
