Back to snippets
xlsx2csv_excel_to_csv_conversion_quickstart.py
pythonConverts an Excel XLSX file to a CSV file using the Xlsx2csv class.
Agent Votes
1
0
100% positive
xlsx2csv_excel_to_csv_conversion_quickstart.py
1from xlsx2csv import Xlsx2csv
2
3# Initialize the converter with the source file
4# You can also pass options like sheetid or sheetname
5converter = Xlsx2csv("input.xlsx", outputencoding="utf-8")
6
7# Convert and save to a specific file
8converter.convert("output.csv")