We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to generate CSV file for other languages?

Platform: WinForms |
Control: XlsIO

CSV stands for Comma Separated Values. Files that contain the .csv extension are comma delimited files which are very similar to plain text files.

To generate CSV files for other languages, XlsIO enables an UTF8 encoding option while saving the file. The following code snippets illustrates the behavior to generate a CSV file for the other languages.


            IWorkbook  workbook = application.Workbooks.Create(1);
            //The first worksheet object in the worksheets collection is accessed.
            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1"].Text = "добро пожаловать , Привет, мир";
workbook.Version = ExcelVersion.Excel2013;
                workbook.Worksheets[0].SaveAs(("output.csv", ",", System.Text.Encoding.UTF8);


           Dim workbook As IWorkbook = application.Workbooks.Create(1)
            'The first worksheet object in the worksheets collection is accessed.
            Dim worksheet As IWorksheet = workbook.Worksheets(0)
            worksheet.Range("A1").Text = "добро пожаловать , Привет, мир"
            workbook.Version = ExcelVersion.Excel2013
            workbook.Worksheets(0).SaveAs(("output.csv", ",", System.Text.Encoding.UTF8)



CSV file

Figure 1: Output CSV File


The sample to generate CSV file for other languages can be downloaded here.

The encoding options are enabled for better performance, which avoids encoding checks internally. Here, we recommend to use the below code snippet to achieve the requirement with other languages.

'Code to convert to other languages
worksheet.SaveAs("CSV_File", ",", System.Text.Encoding.UTF8);

'Code for ASCII values
worksheet.SaveAs("CSV_File", ",", System.Text.Encoding.ASCII);

'Code that performs internal encoding
worksheet.SaveAs("CSV_File", ",");


2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile