Available for: UI for ASP.NET MVC | UI for ASP.NET AJAX | UI for Blazor | UI for WPF | UI for WinForms | UI for Silverlight | UI for Xamarin | UI for WinUI | UI for ASP.NET Core | UI for .NET MAUI

New to Telerik Document Processing? Download free 30-day trial


CsvFormatProvider allows to import and export CSV documents. Additionally, there are a number of settings that allow you to modify the import/export. The current article outlines the available settings.

CsvFormatProvider exposes a Settings property of type CsvSettings. This allows you to specify the following:

  • Delimiter: Gets or sets the list separator. By default the CsvFormatProvider class imports and exports files using the list separator specified by the current culture of the system.

  • Quote: Gets or sets the quote symbol.

  • HasHeaderRow: Specifies whether the document has a header row. The default value is false.

  • Encoding: Gets or sets the character encoding that is used when importing or exporting a file. The default value is UTF8 with BOM.

  • ShouldExportEmptyValues: Gets or Sets a value indicating whether the empty values are exported.

Example 1 shows how to create and specify a particular setting to a CsvFormatProvider.

Example 1: Use CsvSettings

CsvFormatProvider provider = new CsvFormatProvider(); 
provider.Settings.Delimiter = ';'; 
provider.Settings.Quote = '^'; 
provider.Settings.HasHeaderRow = true; 
provider.Settings.Encoding = new UTF8Encoding(); 
In this article