Reading & writing workbooks

Reading Excel files

read_excel, openpyxl and the options that decide what actually lands in your DataFrame.

A sheet with a title row, a header row and codes with leading zeros; skiprows, header and dtype decide what read_excel returns.A sheet with a title row, a header row and codes with leading zeros; skiprows, header and dtype decide what read_excel returns.skiprows, header and dtype decide the DataFrameABC1Monthly report2RegionCodeSales3North001234104South00457388read_excelDataFrameheader=1dtype={"Code": str}

Start with the full guides

The long-form treatment of reading 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 reading 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.

Reading Excel files is part of Reading & writing workbooks.