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: 41.3.30.1032
Syntax
public sealed class CsvSaveOptions : SaveOptions

The CsvSaveOptions type exposes the following members.

Constructors
  NameDescription
Public methodCsvSaveOptions(Char)
Initializes a new instance of the CsvSaveOptions class.
Public methodCode exampleCsvSaveOptions(CsvType)
Initializes a new instance of the CsvSaveOptions class.
Top
Properties
  NameDescription
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.
Top
Examples

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

ef.Save(
    "Report.csv",
    new CsvSaveOptions(CsvType.CommaDelimited)
    {
        FormatProvider = CultureInfo.CurrentCulture
    });
See Also