TabularLoadOptions 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
- Load
Options - Tabular
Load Options
- Load
- Derived
- Csv
Load Options
Limits and worksheet settings for UTF-8 tabular imports. A successful import replaces the workbook.
Syntax
public class TabularLoadOptions
Members
Constructors
| Constructor | Description |
|---|---|
| Constructor |
Properties
| Property | Description |
|---|---|
| InferTypes | Infer numbers and booleans in CSV and untyped XML. Default true; JSON strings remain strings. |
| MaxCells | Maximum rectangular cell count including blanks; defaults to 1,000,000. |
| MaxColumns | Maximum columns; defaults to 16,384. |
| MaxFileBytes | Maximum input bytes; defaults to 32 MiB. |
| MaxRows | Maximum rows, including generated headers; defaults to 1,048,576. |
| SheetName | Imported worksheet name; defaults to Sheet1. |
Examples
Import customer orders, configure bounded tabular exchange and export the processed values or a formatted workbook.
using TXTextControl.TXSheetControl.Server;
async Task<byte[]> ExchangeOrderDataAsync(ServerSheetControl control)
{
await control.LoadTextAsync("<rows><row><Customer>Müller</Customer><Amount>125.5</Amount></row></rows>", StreamType.XML, new TabularLoadOptions { SheetName = "Orders", InferTypes = true, MaxFileBytes = 1048576, MaxRows = 1000, MaxColumns = 20, MaxCells = 20000 });
var sheet=await control.Workbook.Sheets.AtAsync(0);
await sheet.Range("A1:B1").FormatAsync(new { bold=true });
return await control.SaveAsync(StreamType.SpreadsheetML);
}