Reading & writing workbooks

Writing Excel files

to_excel, ExcelWriter and appending to workbooks that already exist.

Writing with pandas: DataFrames go through one ExcelWriter, each to its own sheet, and the workbook is saved once when the writer closes.Writing with pandas: DataFrames go through one ExcelWriter, each to its own sheet, and the workbook is saved once when the writer closes.one ExcelWriter, many sheets, one saveDataFramessales · costssummaryExcelWriterengine=xlsxwriteror openpyxlreport.xlsxone sheet eachsaved on close

Start with the full guides

The long-form treatment of writing excel files, with the reasoning the shorter pages assume.

Step-by-step how-tos

One task each, with code you can copy, run and adapt.

Compare the options

Which tool or approach to pick, and why.

When it breaks

The errors this topic produces, with the cause explained rather than just the fix.

Follow it through a track

Prefer an ordered route? These tracks cover writing excel files along the way, in the order that builds on itself.

Related topics

Subjects that keep turning up on the same pages as this one, most overlap first.

Writing Excel files is part of Reading & writing workbooks.