Class
CsvSettings

Configures delimiter, quote, encoding, and header options for CSV file import and export operations.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.FormatProviders.TextBased.Core

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public class CsvSettings

Inheritance: objectCsvSettings

Constructors

CsvSettings()

Initializes a new instance of the CsvSettings class with default values from the current culture for delimiter, quote, and encoding.

Declaration

cs-api-definition
public CsvSettings()

Properties

Delimiter

Gets or sets the character used to separate values in CSV data, defaulting to the list separator of the current culture.

Declaration

cs-api-definition
public char Delimiter { get; set; }

Property Value

char

The delimiter symbol.

Encoding

Gets or sets the text encoding used for reading and writing CSV files, defaulting to UTF-8 with BOM.

Declaration

cs-api-definition
public Encoding Encoding { get; set; }

Property Value

Encoding

The encoding.

HasHeaderRow

Gets or sets a value indicating whether the first row of CSV data contains column headers rather than data, defaulting to false.

Declaration

cs-api-definition
public bool HasHeaderRow { get; set; }

Property Value

bool

The has header row.

Quote

Gets or sets the character used to quote values containing delimiters or line breaks, defaulting to double-quote (").

Declaration

cs-api-definition
public char Quote { get; set; }

Property Value

char

The quote symbol.

ShouldExportEmptyValues

Gets or sets a value indicating whether empty cell values are included in the CSV export, affecting trailing delimiters on rows.

Declaration

cs-api-definition
public bool ShouldExportEmptyValues { get; set; }

Property Value

bool

True if the empty values are exported; otherwise false.

Methods

Equals(object)

Determines whether the specified object is a CsvSettings instance with equal delimiter, quote, header row, and encoding values.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Overrides object.Equals(object)

GetHashCode()

Computes a hash code by combining the hash codes of delimiter, quote, header row, and encoding properties.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides object.GetHashCode()

Operators

operator !=(CsvSettings, CsvSettings)

Determines whether two CsvSettings instances are not equal by comparing their delimiter, quote, header row, and encoding settings.

Declaration

cs-api-definition
public static bool operator !=(CsvSettings first, CsvSettings second)

Parameters

first

CsvSettings

The first value.

second

CsvSettings

The second value.

Returns

bool

The result of the operator.

operator ==(CsvSettings, CsvSettings)

Determines whether two CsvSettings instances are equal by comparing their delimiter, quote, header row, and encoding settings.

Declaration

cs-api-definition
public static bool operator ==(CsvSettings first, CsvSettings second)

Parameters

first

CsvSettings

The first value.

second

CsvSettings

The second value.

Returns

bool

The result of the operator.