Apache-2.0 · open source
xlsxedit
Surgical .xlsx editing for Python — change only what you ask for and leave styles, themes, charts, and other package parts intact.
pip install xlsxedit
The problem
You have a styled Excel report: merged headers, brand colors, a chart, maybe images. Most libraries rebuild the workbook from a Python object model, so anything that model does not know about is dropped on save. xlsxedit loads the file as an OPC package, patches targeted XML, and writes back — so templates survive.
Why xlsxedit
- Template fidelity — charts, drawings, themes, and unknown OOXML round-trip when you do not touch them
- Headless — no Excel app; runs on servers, CI, and cron jobs
- Fast file I/O — direct
.xlsxediting; ~20k rows/s bulk export in benchmarks - Search-and-replace —
replace,replace_image, typed placeholders - Bulk export —
write_dataframeinto a designed layout with row/column styles - Pandas — optional
engine="xlsxedit"forExcelWriterandread_excel - Familiar API —
Workbook.open→ mutate →save
Quick start
from xlsxedit import Workbook
wb = Workbook("invoice-template.xlsx") # same as Workbook.open(...)
wb.replace("{client}", "Jonas Corp")
wb.replace("{amount}", 520, value_type="number")
wb.replace("{date}", "2025-08-07", value_type="date")
wb.save("invoice-filled.xlsx")