This section just aims at introducing an easiest solution to convert Excel (XLS/XLSX) to CSV with C#, VB.NET via an Excel component. Two reasons can be attributed to call this solution the easiest: One is that the key code of Excel to CSV is only three lines; the other reason is that you can directly convert Excel to CSV without opening the original Excel file.

Spire.XLS for .NET, as a .NET Excel component, enables users to fast create, read, write and modify Excel document without Microsoft Office Excel Automation. Besides, it has powerful conversion functions, such as it can easily convert excel to PDF, Excel to HTML, Excel to XML, XML to Excel, Excel to Image and Excel to CSV.

By calling a class Spire.XLS.Worksheet in Spire.XLS.dll component, you can convert Excel to CSV by calling a method: public void SaveToFile(string fileName, string separator, Encoding encoding) with three parameters passed. Please preview the effective screenshot of this task first: