Convert XLS XLSX to CSV in Java

XLS or XLSX files are commonly used to store the data in the form of rows and columns. However, while processing the data, you often need to convert Excel files to CSV (Comma Separated Values) format. To perform this conversion programmatically, this article shows how to convert an Excel XLS or XLSX file to CSV in Java.

Java API for XLS to CSV Conversion

To convert Excel XLS or XLSX files to CSV format, we will use Aspose.Cells for Java. It is an amazing API that provides a bunch of features for creating and processing spreadsheet documents. Furthermore, it offers a high-fidelity conversion of spreadsheet files to other formats. You can download its JAR or install it directly using the following Maven configurations.


	<name>Aspose Java API</name>



Convert an XLS File to CSV in Java

To convert an Excel file to CSV, you only need to load the XLS or XLSX file and save it in CSV format. The following are the steps to convert an XLS file to CSV in Java.

The following code sample shows how to save an XSL file as CSV in Java.

Get a Free License

You can get a free temporary license to use Aspose.Cells for Java without evaluation limitations.


In this article, you have learned how to convert XLS or XLSX files to CSV programmatically in Java. The code sample has demonstrated how you can integrate XLS or XLSX to CSV conversion in your Java applications. In addition, you can visit the documentation to explore other features of Aspose.Cells for Java. Also, you can share your questions or queries with us via our forum.

See Also