Click or drag to resize

CsvSaveOptions Class

Represents options for saving to Character Separated Values file format.
Inheritance Hierarchy

Namespace:  GemBox.Spreadsheet
Assembly:  GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version:
public sealed class CsvSaveOptions : SaveOptions

The CsvSaveOptions type exposes the following members.

Public methodCsvSaveOptions(Char)
Initializes a new instance of the CsvSaveOptions class.
Public methodCode exampleCsvSaveOptions(CsvType)
Initializes a new instance of the CsvSaveOptions class.
Public propertyAlwaysQuoteValues
Gets or sets a value indicating whether values in CSV file will always be quoted. Default value is false.
Public propertyContentType
Gets the content-type for CSV file format:
(Overrides SaveOptionsContentType.)
Public propertyEncoding
Gets or sets the encoding for the CSV file.
Public propertyCode exampleFormatProvider
Gets or sets the format provider for the CSV file.
Public propertyLimitations
Gets limitations for saving to CSV file format.
(Overrides SaveOptionsLimitations.)
Public propertySeparator
Gets or sets character that serves as value delimiter.
Public propertyType
Gets or sets value delimiter type, see CsvType.

Following code demonstrates how to save ExcelCell.Values to CSV file format. Value (numbers, dates, etc.) will be converted to string using specified culture.

    new CsvSaveOptions(CsvType.CommaDelimited)
        FormatProvider = CultureInfo.CurrentCulture
See Also