TabularSaveOptions 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
- Save
Options - Tabular
Save Options
- Save
- Derived
- Csv
Save , JsonOptions Save Options
Exports values and calculated formula results from one worksheet without modifying it.
Syntax
public class TabularSaveOptions
Members
Constructors
| Constructor | Description |
|---|---|
| Constructor |
Properties
| Property | Description |
|---|---|
| HasHeaderRow | JSON records/XML use the first row as field names by default; false generates Column1, etc. CSV ignores this setting. |
| MaxCells | Maximum selected rectangular cell count; defaults to 1,000,000. |
| MaxFileBytes | Maximum output bytes; defaults to 32 MiB. |
| Range | Inclusive A1 rectangle; defaults to A1 through the last populated cell. |
| SheetName | Worksheet name; defaults to the active worksheet. |
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("Customer;Amount;Total\nMüller;125,5;0", StreamType.CSV, new CsvLoadOptions {Delimiter=";",DecimalSeparator=",",SheetName="Orders"});
var sheet=await control.Workbook.Sheets.AtAsync(0);
await sheet.Cell("C2").SetFormulaAsync("=B2*1.19");
return await control.SaveAsync(StreamType.XML, new TabularSaveOptions { SheetName = "Orders", Range = "A1:C2", HasHeaderRow = true, MaxCells = 10000, MaxFileBytes = 1048576 });
}