Export any Excel sheet to a clean CSV file you can import into other tools, databases, or scripts. Choose the worksheet and delimiter you want.
CSV is a single table. This tool opens the workbook with openpyxl, walks the active sheet, and writes UTF-8 CSV of the displayed values — not the formulas. .xlsx and .xls both upload; only one sheet comes out.
CSV is a single-table format. Only the sheet that was active when you saved the .xlsx gets exported. For multi-sheet workbooks, save each sheet as a separate file first or export them one at a time.
If a cell shows =SUM(A1:A10), the CSV captures the resulting number — the formula itself is lost. Keep the .xlsx archived if you need the logic later.
Merged cells collapse into the top-left value; the other cells become empty. Unmerge before export if your downstream tool needs a dense, complete data grid.
The workbook is loaded and ws.iter_rows(values_only=True) walks the active sheet. Each cell is stringified; empty cells become empty fields. Python's csv.writer quotes fields that need it. No second sheet is touched.
A CSV cell cannot store both a formula and a cached result. We export the cached value so a database import does not choke on =SUM. If you need the logic, keep the .xlsx — this tool is for data handoff, not for round-tripping a model.
The file is written as UTF-8. Characters that were already in the workbook stay as they were; we do not re-encode through Latin-1. That avoids the classic 'é' corruption that happens when a UTF-8 CSV is opened as Windows-1252.
The active sheet (wb.active) is exported — usually the tab that was selected when the file was last saved. Multi-sheet export is not supported because CSV has no sheet concept.
No — openpyxl is asked for values_only, so you get the calculated number, not =SUM(...).
Merged cells export the value in the top-left cell of the merged range. Other cells in the merge appear empty.
UTF-8 without a BOM. Google Sheets, Python, and most databases are happy with that. Very old Excel-on-Windows may still want a BOM — open the CSV in a modern Excel or add the BOM locally if you hit that case.