# ExcelCsvOptions

Settings for moving rows between CSV and worksheets, in either direction.

Class 

`OfficeIMO.Excel.Csv`

**Namespace**

`OfficeIMO.Excel.Csv`

**Assembly**

`OfficeIMO.Excel.Csv`

**Source revision**

`0ec96f8dbe73` with working tree changes

**Source**

[ExcelCsvOptions.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L15)

**Modifiers**

sealed

Settings for moving rows between CSV and worksheets, in either direction. CSV parsing and writing stay with CsvReaderOptions and CsvSaveOptions; these settings place the rows in the workbook.

## Inheritance

- object
- ExcelCsvOptions

## Usage

Explore 18 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Accepted by parameters 18

- Method [ExcelDocumentCsvExtensions.ImportCsv](/api/excel-csv/officeimo-excel-csv-exceldocumentcsvextensions/#method-importcsv-officeimo-excel-exceldocument-officeimo-csv-csvdocument-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelDocumentCsvExtensions.ImportCsvAsync](/api/excel-csv/officeimo-excel-csv-exceldocumentcsvextensions/#method-importcsvasync-officeimo-excel-exceldocument-io-stream-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelDocumentCsvExtensions.ImportCsvFile](/api/excel-csv/officeimo-excel-csv-exceldocumentcsvextensions/#method-importcsvfile-officeimo-excel-exceldocument-string-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelDocumentCsvExtensions.ImportCsvFileAsync](/api/excel-csv/officeimo-excel-csv-exceldocumentcsvextensions/#method-importcsvfileasync-officeimo-excel-exceldocument-string-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelDocumentCsvExtensions.ImportCsvText](/api/excel-csv/officeimo-excel-csv-exceldocumentcsvextensions/#method-importcsvtext-officeimo-excel-exceldocument-string-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelDocumentCsvExtensions.SaveAsExcel](/api/excel-csv/officeimo-excel-csv-exceldocumentcsvextensions/#method-saveasexcel-officeimo-csv-csvdocument-io-stream-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelDocumentCsvExtensions.SaveAsExcelAsync](/api/excel-csv/officeimo-excel-csv-exceldocumentcsvextensions/#method-saveasexcelasync-officeimo-csv-csvdocument-string-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelDocumentCsvExtensions.ToExcel](/api/excel-csv/officeimo-excel-csv-exceldocumentcsvextensions/#method-toexcel-officeimo-csv-csvdocument-officeimo-excel-csv-excelcsvoptions-officeimo-excel-csv-excelcsvreport-threading-cancellationtoken) parameter `options`
- Method [ExcelDocumentCsvExtensions.ToExcelAsync](/api/excel-csv/officeimo-excel-csv-exceldocumentcsvextensions/#method-toexcelasync-officeimo-csv-csvdocument-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelSheetCsvExtensions.ImportCsv](/api/excel-csv/officeimo-excel-csv-excelsheetcsvextensions/#method-importcsv-officeimo-excel-excelsheet-officeimo-csv-csvdocument-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelSheetCsvExtensions.ImportCsvAsync](/api/excel-csv/officeimo-excel-csv-excelsheetcsvextensions/#method-importcsvasync-officeimo-excel-excelsheet-io-stream-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelSheetCsvExtensions.ImportCsvFile](/api/excel-csv/officeimo-excel-csv-excelsheetcsvextensions/#method-importcsvfile-officeimo-excel-excelsheet-string-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelSheetCsvExtensions.ImportCsvFileAsync](/api/excel-csv/officeimo-excel-csv-excelsheetcsvextensions/#method-importcsvfileasync-officeimo-excel-excelsheet-string-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelSheetCsvExtensions.ImportCsvText](/api/excel-csv/officeimo-excel-csv-excelsheetcsvextensions/#method-importcsvtext-officeimo-excel-excelsheet-string-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelSheetCsvExtensions.SaveAsCsv](/api/excel-csv/officeimo-excel-csv-excelsheetcsvextensions/#method-saveascsv-officeimo-excel-excelsheet-string-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelSheetCsvExtensions.SaveAsCsvAsync](/api/excel-csv/officeimo-excel-csv-excelsheetcsvextensions/#method-saveascsvasync-officeimo-excel-excelsheet-string-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelSheetCsvExtensions.ToCsv](/api/excel-csv/officeimo-excel-csv-excelsheetcsvextensions/#method-tocsv-officeimo-excel-excelsheet-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`
- Method [ExcelSheetCsvExtensions.ToCsvAsync](/api/excel-csv/officeimo-excel-csv-excelsheetcsvextensions/#method-tocsvasync-officeimo-excel-excelsheet-officeimo-excel-csv-excelcsvoptions-threading-cancellationtoken) parameter `options`

Filter members 

Show inherited

## Constructors

`public ExcelCsvOptions()` [#](#constructor-ctor)

[ExcelCsvOptions.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L15)

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public CsvReaderOptions CsvReader { get; set; }` [#](#property-csvreader)

[ExcelCsvOptions.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L15)

Gets or sets how CSV is parsed and typed. Defaults to a detected delimiter and inferred column types. A file import without options reads a .tsv or .tab file as IANA TSV, where quotes are data.

`public CsvSaveOptions? CsvSave { get; set; }` [#](#property-csvsave)

[ExcelCsvOptions.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L18)

Gets or sets how CSV is written: delimiter, quoting, encoding and line breaks. Defaults to the CSV defaults.

`public ExcelReaderOptions? ExcelReader { get; set; }` [#](#property-excelreader)

[ExcelCsvOptions.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L21)

Gets or sets how worksheet cells are read for CSV: value projection and culture.

`public ExcelCreateOptions? ExcelCreate { get; set; }` [#](#property-excelcreate)

[ExcelCsvOptions.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L24)

Gets or sets the options for the workbook that ToExcel and SaveAsExcel create.

`public ExcelSaveOptions? ExcelSave { get; set; }` [#](#property-excelsave)

[ExcelCsvOptions.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L27)

Gets or sets how SaveAsExcel writes the workbook, including its file format.

`public string SheetName { get; set; }` [#](#property-sheetname)

[ExcelCsvOptions.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L30)

Gets or sets the worksheet a CSV import adds to a workbook. Defaults to Import.

`public string? Range { get; set; }` [#](#property-range)

[ExcelCsvOptions.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L33)

Gets or sets the A1 range written as CSV, or null (the default) for the used range.

`public bool HeaderRow { get; set; }` [#](#property-headerrow)

[ExcelCsvOptions.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L39)

Gets or sets whether the worksheet's first row holds the field names: written above imported rows, and read as names when a worksheet is written as CSV. Defaults to true.

`public int StartRow { get; set; }` [#](#property-startrow)

[ExcelCsvOptions.cs:42](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L42)

Gets or sets the 1-based row an import starts at. Defaults to 1.

`public int StartColumn { get; set; }` [#](#property-startcolumn)

[ExcelCsvOptions.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L45)

Gets or sets the 1-based column an import starts at. Defaults to 1.

`public bool CreateTable { get; set; }` [#](#property-createtable)

[ExcelCsvOptions.cs:48](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L48)

Gets or sets whether an import creates an Excel table over its rows. Defaults to true.

`public string? TableName { get; set; }` [#](#property-tablename)

[ExcelCsvOptions.cs:51](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L51)

Gets or sets the table name; when empty, the worksheet name is used.

`public ExcelTableStyle TableStyle { get; set; }` [#](#property-tablestyle)

[ExcelCsvOptions.cs:54](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L54)

Gets or sets the table style. Defaults to ExcelTableStyle.TableStyleMedium2.

`public bool IncludeAutoFilter { get; set; }` [#](#property-includeautofilter)

[ExcelCsvOptions.cs:57](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L57)

Gets or sets whether the table has filter buttons. Defaults to true.

`public bool AutoFit { get; set; }` [#](#property-autofit)

[ExcelCsvOptions.cs:60](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L60)

Gets or sets whether imported columns are sized to their content.

`public bool FailOnLoss { get; set; }` [#](#property-failonloss)

[ExcelCsvOptions.cs:66](https://github.com/EvotecIT/OfficeIMO/blob/0ec96f8dbe73d007f9ad409b3e178ff58c9280d9/Sources/OfficeIMO.Excel.Csv/ExcelCsvOptions.cs#L66)

Gets or sets whether a conversion (ToExcel, SaveAsExcel, ToCsv, SaveAsCsv) fails before writing when its report describes loss. Imports into an existing workbook only report it.

<!-- PowerForge markdown artifact sha256:53D5AAB72D412322341CD068AC75BE0EFC0708C18F3758D1BCE97B8A1434B8EA -->
