import xlrd
workbook = xlrd.open_workbook("成绩表.xlsx")
#获取所有的sheet名字
# print(workbook.sheet_names())
# 根据索引获取指定的sheet对象
sheet = workbook.sheet_by_index(1)
print(sheet.name)
Python实战笔记-excel读取1
最新推荐文章于 2021-01-26 16:26:30 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
import xlrd
workbook = xlrd.open_workbook("成绩表.xlsx")
#获取所有的sheet名字
# print(workbook.sheet_names())
# 根据索引获取指定的sheet对象
sheet = workbook.sheet_by_index(1)
print(sheet.name)