Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

The Syncfusion .NET Excel Library (XlsIO) offers comprehensive support for converting CSV files to Excel format. It allows users to create Excel documents from CSV files, supporting various CSV formats. Formats such as CSV, TXT, and other delimited files can be converted into Excel formats like .xlsx, .xls, .xlsm, and .xltm.

How to save a CSV file in C#

This example code shows how to save a CSV file as an Excel document using the Syncfusion .NET Excel Library with just a few lines of code in C#.

// Initialize Excel engine and application.
using ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
// Open an existing CSV file with comma separator.
using FileStream inputStream = new FileStream("InputTemplate.csv", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream, ",");
// Save the CSV data as an Excel file.
using FileStream outputStream = new FileStream("CSV to Excel.xlsx", FileMode.Create, FileAccess.ReadWrite);
workbook.SaveAs(outputStream);

CSV-to-Excel conversion references

Discover valuable resources from our blog and knowledge base to enhance your efficiency in converting CSV data to Excel format.

Seamlessly Import and Export CSV Data in Excel Using Csharp

Blog

Seamlessly Import and Export CSV Data in Excel Using C#

How to merge multiple CSV files into single Excel workbook

Knowledge base

How to merge multiple CSV files into single Excel workbook

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

Knowledge base

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

Syncfusion .NET Excel Library Resources

Explore these resources for comprehensive guides, knowledge base articles, insightful blogs, and ebooks.

Frequently Asked Questions

To open a CSV file, you must specify its delimiter. If the delimiter is a comma (,), no specification is needed, as the Syncfusion Excel library defaults to a comma (,). However, for delimiters like tab (\t), semicolon (;), colon (:), space ( ), or the equals sign (=), you must specify the delimiter during opening to ensure accurate parsing and handling of CSV data.

To open an existing TSV (tab-separated values) file using the Syncfusion Excel Library, you need to specify the tab delimiter before opening the document using the Excel library.

The double quotes symbol is used as the qualifier value.

Yes. Syncfusion provides support for XLSX-to-CSV conversion. You can specify the required delimiter when saving the CSV document.

The Syncfusion Excel Library allows a maximum of 1,048,576 rows and 16,384 columns when loading or saving a CSV document.

Yes, it is possible to merge multiple CSV files into a single Excel file using the Syncfusion Excel Library.

Yes. Syncfusion Excel Library provides support for both reading and writing CSV documents. So, you can open any CSV document and save it after the changes are finished.

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion® reduces customers’ development time.
Here are some of their experiences.

Rated by users across the globe

Want to create, View, and edit Excel files in C# or VB.NET?

Start a free 30-day evaluation today!
DOWNLOAD FREE TRIAL

No credit card required.

Mobile Free Evaluation Section

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion® is proud to hold the following industry awards.

Scroll up icon