# Python 如何读取 Excel 文件

URL: https://caijiao.org/how-to/python/read-excel
Source: docs/how-to/python/read-excel.md
Description: Python 如何读取 Excel 文件：用 pandas.read_excel 最快，批处理时明确 sheet_name。 包含脚本示例、处理提醒和相关 Python、工具内容入口。

## 快速答案

用 pandas.read_excel 最快，批处理时明确 sheet_name。

```py
import pandas as pd
df = pd.read_excel('data.xlsx', sheet_name='Sheet1')
print(df.head())
```

## 使用要点

- 先用小样本确认字段、编码和空值，再处理完整数据。
- 写出文件前确认分隔符、日期格式和中文编码，避免后续工具打不开。

## 相关内容

- [Python 问题](/how-to/python/)
- [Python 教程](/python/)
- [Python 文件处理项目](/python/ch11/project-filetool)
- [正则表达式测试工具](/tool/regex-tester)
- [JSON Formatter](/tool/json-formatter)
