TX Sheet Control

CsvSaveOptions.DecimalSeparator Property

Property
Namespace
TXTextControl.TXSheetControl.Server
Package
TXTextControl.TXSheetControl.Server as TXTextControl.TXSheetControl.Api.dll from the private NuGet feed or the supplied NuGet folder
Also in
TXTextControl.TXSheetControl.Blazor as TXTextControl.TXSheetControl.Api.dll

Decimal separator for numbers: period (default) or comma.

Syntax

public string? DecimalSeparator { get; init; }

Property Value

string?.

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.CSV, new CsvSaveOptions { SheetName = "Orders", Range = "A1:C2", HasHeaderRow = true, MaxCells = 10000, MaxFileBytes = 1048576, Delimiter = ";", DecimalSeparator = ",", Bom = true, LineEnding = "\r\n", EscapeFormulas = true });
}

Remarks

Use the member with an instance or settings object from the documented package. Await task-returning operations. Document-bound handles must be resolved again after loading or deleting their owner.

See Also