Export Excel to CSV, XML, HTML, XLSX

IronXL for Python makes it easy to save and export Excel files across a wide range of formats, removing the need for manual conversions. It supports XLS, XLSX, CSV, JSON, XML, and HTML, making it well suited for reporting, web integration, and data exchange scenarios. With just a few lines of Python, developers can produce well-structured spreadsheets compatible with many downstream systems, or transform Excel data into formats ready for APIs and databases.

WorkBook.Create() initializes a blank workbook. A worksheet named "new_sheet" is added immediately, and the value "Hello World" is written to cell A1 in a single chained statement—demonstrating how compact and readable IronXL's Python API is.

The background color of cell A1 is then customized using the Style.BackgroundColor property. This highlights IronXL's styling capabilities, enabling developers to produce polished spreadsheets with minimal code.

SaveAs writes the workbook to disk in .xlsx format, ensuring full compatibility with Microsoft Excel and other spreadsheet applications.

ExportToHtml converts the workbook to an HTML file, making the tabular data accessible for web-based reports or dashboards without any additional processing. This single method replaces a complex transformation pipeline.

Together, these export options give Python developers the flexibility to serve Excel data in whichever format best fits their application—whether that is a downloadable spreadsheet, a JSON payload, or an embeddable HTML table.

Click here to view the How-to Guide, including examples, sample code, and files

Ready to Get Started?
Version: 2026.5 just released
Still Scrolling Icon

Still Scrolling?

Want proof fast?
run a sample watch your data become a spreadsheet.