CsvSaveOptions Class
Represents options for saving to Character Separated Values file format.
public sealed class CsvSaveOptions : SaveOptionsPublic NotInheritable Class CsvSaveOptions
    Inherits SaveOptions- Inheritance:
 - System.ObjectCsvSaveOptions
 
Constructors
CsvSaveOptions(CsvType)
Initializes a new instance of the CsvSaveOptions class.
Parameters
CsvSaveOptions(Char)
Initializes a new instance of the CsvSaveOptions class.
Parameters
separator- System.Char
 
Character that will serve as value delimiter.
Properties
ContentType
Gets the content-type for CSV file format:
- "text/tab-separated-values; charset=" + Encoding.System.Text.Encoding.WebName if Type is TabDelimited, otherwise
 - "text/csv; charset=" + Encoding.System.Text.Encoding.WebName.
 
public override string ContentType { get; }Public Overrides ReadOnly Property ContentType As StringProperty Value
- System.String
 
The content-type for CSV file format.
Overrides
Encoding
Gets or sets the encoding for the CSV file.
Property Value
- System.Text.Encoding
 
Exceptions
- System.ArgumentNullException
 
Value is set to null.
FormatProvider
Gets or sets the format provider for the CSV file.
public IFormatProvider FormatProvider { get; set; }Public Property FormatProvider As IFormatProviderProperty Value
- System.IFormatProvider
 
Exceptions
- System.ArgumentNullException
 
Value is set to null.
Limitations
Gets limitations for saving to CSV file format.
public override FileFormatLimitations Limitations { get; }Public Overrides ReadOnly Property Limitations As FileFormatLimitationsProperty Value
Overrides
Remarks
These are the limits:
- MaxRows: System.Int32.MaxValue
 - MaxColumns: System.Int32.MaxValue
 - MaxColors: System.Int32.MaxValue
 - MaxCellStyles: System.Int32.MaxValue
 
QuoteMode
Gets or sets a value indicating in which conditions values in a CSV file should be quoted. Default value is Default.
Property Value
Separator
Gets or sets character that serves as value delimiter.
Property Value
- System.Char
 
Exceptions
- System.ArgumentException
 
Value is set to quote '"' or new line '\n'.
Type
Gets or sets value delimiter type, see CsvType.
Property Value
- System.Nullable<CsvType>
 
Exceptions
- System.ArgumentNullException
 
Value is set to null.
UseFormattedValues
Gets or sets a value indicating whether values in CSV file will be formatted using NumberFormat. Default value is false.
Property Value
- System.Boolean
 
Inherited Properties
| CsvDefault | Gets the default options for saving to Character Separated Values file format. (Inherited from SaveOptions)  | 
| HtmlDefault | Gets the default options for saving to HyperText Markup Language File format. (Inherited from SaveOptions)  | 
| ImageDefault | Gets the default options for saving to image formats. (Inherited from SaveOptions)  | 
| OdsDefault | Gets the default options for saving to OpenDocument Spreadsheet file format. (Inherited from SaveOptions)  | 
| PdfDefault | Gets the default options for saving to Portable Document Format file. (Inherited from SaveOptions)  | 
| TxtDefault | Gets the default options for saving to Tab delimited file format. (Inherited from SaveOptions)  | 
| XlsDefault | Gets the default options for saving to, XLS file format (Microsoft Excel Spreadsheet format; Excel 2003 and prior versions) . (Inherited from SaveOptions)  | 
| XlsbDefault | Gets the default options for saving to XLSB file format (Microsoft Excel Binary File Format). (Inherited from SaveOptions)  | 
| XlsxDefault | Gets the default options for saving to XLSX file format (Microsoft Excel Open XML Spreadsheet; Excel 2007 and later). (Inherited from SaveOptions)  | 
| XpsDefault | Gets the default options for saving to XML Paper Specification file format. (Inherited from SaveOptions)  |