Excel to CSV Python

Excel spreadsheets are widely used to keep, import, or export data from one application to another. In addition, you can perform various operations on data, such as sorting, applying mathematical formulas, generating charts, etc. However, in various cases, Excel’s XLSX or XLS workbooks are required to be converted to CSV (Comma Separated Values) format. For such scenarios, this article covers how to convert Excel files to CSV in Python.

Python Excel to CSV Converter API

In order to convert Excel’s XLSX or XLS formats to CSV, we will use Aspose.Cells for Python via Java. It is a powerful spreadsheet manipulation API that allows you to create, modify or convert Excel files. You can install the API using the following command.

pip install aspose-cells

Convert Excel File to CSV

The following are the steps to convert an Excel XLSX or XLS file to CSV in Python.

The following code sample shows how to convert an XLSX file to CSV in Python.

Excel File

Excel to CSV Python

Converted CSV

My Data,,,,,,,

Items A,Items B,Items C,Items D,Items E,Items F,Items G,Items H

Get a Free API License

You can use the API without evaluation limitations by requesting a free temporary license.


In this article, you have learned how to convert Excel files to CSV in Python. You can explore more about the Python spreadsheet API using the documentation. In case you would have any questions or queries, feel free to let us know via our forum.

See Also