# CsvSaveOptions Class

> CsvSaveOptions class in the TX Sheet Control .NET API: UTF-8 CSV output contains every selected row and uses double-quote escaping.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Inherits:** `TXTextControl.TXSheetControl.Server.SaveOptions` › `TXTextControl.TXSheetControl.Server.TabularSaveOptions`
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > CsvSaveOptions Class
- **898 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/llms-full.txt

---

UTF-8 CSV output contains every selected row and uses double-quote escaping.

### Syntax

```csharp
public class CsvSaveOptions
```

### Members

#### Constructors

| Constructor | Description |
|---|---|
| [Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/constructor/llms-full.txt) |  |

#### Properties

| Property | Description |
|---|---|
| [Bom](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/bom-property/llms-full.txt) | Include a UTF-8 byte-order mark; defaults to false. |
| [DecimalSeparator](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/decimalseparator-property/llms-full.txt) | Decimal separator for numbers: period (default) or comma. |
| [Delimiter](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/delimiter-property/llms-full.txt) | One non-quote, non-newline delimiter; defaults to comma. |
| [EscapeFormulas](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/escapeformulas-property/llms-full.txt) | Prefix formula-like text with an apostrophe for spreadsheet consumers. Default true; false preserves exact text. |
| [LineEnding](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/lineending-property/llms-full.txt) | CRLF (default) or LF record ending. Embedded line breaks stay in quoted fields. |

### Examples

Import customer orders, configure bounded tabular exchange and export the processed values or a formatted workbook.

```csharp
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 });
}
```

### See Also

- [TXTextControl.TXSheetControl.Server Namespace](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/llms-full.txt)
- [CSV, XML and JSON Data](https://docs.textcontrol.com/tx-sheet-control/document-processing/tabular-data/llms-full.txt)

---

## In This Section

- [CsvSaveOptions.Bom Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/bom-property/llms-full.txt): CsvSaveOptions.Bom property in the TX Sheet Control .NET API: Include a UTF-8 byte-order mark; defaults to false. Covers its type bool? and a C# example.
- [CsvSaveOptions Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/constructor/llms-full.txt): CsvSaveOptions constructor in the TX Sheet Control .NET API, with its syntax, a C# example and remarks on awaiting tasks and handles.
- [CsvSaveOptions.DecimalSeparator Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/decimalseparator-property/llms-full.txt): CsvSaveOptions.DecimalSeparator property in the TX Sheet Control .NET API: Decimal separator for numbers: period (default) or comma.
- [CsvSaveOptions.Delimiter Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/delimiter-property/llms-full.txt): CsvSaveOptions.Delimiter property in the TX Sheet Control .NET API: One non-quote, non-newline delimiter; defaults to comma.
- [CsvSaveOptions.EscapeFormulas Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/escapeformulas-property/llms-full.txt): CsvSaveOptions.EscapeFormulas property in the TX Sheet Control .NET API: Prefix formula-like text with an apostrophe for spreadsheet consumers. Default true.
- [CsvSaveOptions.LineEnding Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/lineending-property/llms-full.txt): CsvSaveOptions.LineEnding property in the TX Sheet Control .NET API: CRLF (default) or LF record ending. Embedded line breaks stay in quoted fields.

---

## Nearby

- **Previous:** [CsvLoadOptions.Delimiter Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvloadoptions/delimiter-property/llms-full.txt)
- **Next:** [CsvSaveOptions Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/csvsaveoptions/constructor/llms-full.txt)
