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

Does XlsIO support CSV file format?

Yes, XlsIO supports opening and saving of CSV files.

Syncfusion Excel (XlsIO) library is a .NET Excel library used to create, read, and edit Excel documents. Also, converts Excel documents to PDF files. Using this library, you can open and save files in CSV file format.

By default, CSV files are opened in Excel 2003 format. If the file has more than 65536 rows of data, it is recommended to set the default version to Excel 2007 or above.

Steps to open and save files in CSV file format, programmatically:

Step 1: Create a new C# console application project.

Create a new C# console application

Create a new C# console application

Step 2: Install the Syncfusion.XlsIO.WinForms NuGet package as reference to your .NET Framework application from NuGet.org.

Install NuGet package

Install NuGet package

Step 3: Include the following namespace in the Program.cs file.


using Syncfusion.XlsIO;



Imports Syncfusion.XlsIO


Step 4: Use the following code snippet to open and save files in CSV file format using XlsIO in C#, VB.NET.


//Create Excel engine
using (ExcelEngine excelEngine = new ExcelEngine())
    //Instantiate the application object
    IApplication application = excelEngine.Excel;
    //Set default application verion as Excel 2013
    application.DefaultVersion = ExcelVersion.Excel2013;
    //Open CSV file
    IWorkbook workbook = application.Workbooks.Open("CSVFile.csv");
    //Save CSV file
    workbook.SaveAs("Output.csv", ",");



'Create Excel engine
Using excelEngine As ExcelEngine = New ExcelEngine()
    'Instantiate the application object
    Dim application As IApplication = excelEngine.Excel
    'Set default application verion as Excel 2013
    application.DefaultVersion = ExcelVersion.Excel2013
    'Open CSV file
    Dim workbook As IWorkbook = application.Workbooks.Open("CSVFile.csv")
    'Save CSV file
    workbook.SaveAs("Output.csv", ",")
End Using


A complete Windows Forms working example of how to open and save CSV file using XlsIO in C# and VB.NET can be downloaded from Open-And-Save-CSV-File.zip.

By executing the program, you will get the output as below.

Output Excel document

Output Excel document

Refer here to explore the rich set of Syncfusion Excel (XlsIO) library features.

See Also:

Convert Excel file to CSV in C#, VB.NET

How to convert a CSV file into Excel document using XlsIO in PowerShell?

How to export Excel data to CSV file?

How to get hyperlink url from the CSV file using XlsIO

How to generate CSV file for other languages?


Starting with v16.2.0.x, if you reference Syncfusion assemblies from trial setup or from the NuGet feed, include a license key in your projects. Refer the link to learn about generating and registering Syncfusion license key in your application to use the components without trial message.


2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment
Michael Baas
Aug 21, 2017

Thank you. That "," used as second argument in the Open-Command, does that have a different effect than using ExcelOpenType.CSV and wouldn't the latter be cleaner?

Also, when I try to execute it, I get "EXCEPTION: Das angegebene Argument liegt außerhalb des gültigen Wertebereichs." ("Specified argument outside permitted range") Admittedly I am challenging the library because I'm attempting to import a file with 1.000.000 rows, but I think since even Excel can handle that, it shouldn't be a problem for XlsIO ;-)

Sridhar Sukumar [Syncfusion]
Aug 23, 2017

Hi Michael,


There is no difference between opening a CSV document in XlsIO with comma separator and ExcelOpenType as CSV. We suspect that the exception might be raised due to opening the CSV document with 10,00,000 rows in XlsIO when application version earlier to MS Excel 2007. We request you to set the IApplication.DefaultVersion as Excel.2007 or above before open a file to overcome the issue. Please refer the following code example to achieve this.


Code snippet:

Application.DefaultVersion = ExcelVersion.Excel2007;




Michael Baas
Aug 25, 2017

Thank you for your suggestion. Did that - and then I get a message "PPPPPP is not valid named range".  I'm pretty sure the 1,000,000 rows are the problem - a smaller version of that file with just 50,000 rows went in just fine.

Oh, and just looking at ExcelOPenType, I was wondering why the .CSV is required if there also is a .Automatic - but that did not recognize the file as CSV. (I was hoping I might be able to avoid special casing .CSV with "Automatic", but if that doesn't work, I'll have to do ugly IF's ;-))

Sridhar Sukumar [Syncfusion]
Aug 28, 2017

Hi Michael,


A support incident to track the status of this query has been created under your account. Please log on to our support website to check for further updates




Please let me know if you have any questions.




Aug 22, 2018


I would just like to find out what the resolution to this problem was?


Mohan Chandran [Syncfusion]
Aug 23, 2018

Hi Adriaan,


We had confirmed this as an issue and it was already fixed in our release v15.3.0.33 which was rolled out in end of September 2017. So, we request you to upgrade to our latest product version v16.2.0.46 to get this issue resolved.





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