Python对Excel的操作(模块xlrd)

1.获取sheet的数量和名称

1 import xlrd
2 b = xlrd.open_workbook('path/to/excel')
3 count = len(b.sheets()) #sheet数量
4 for sheet in b.sheets():
5     print sheet.name #sheet名称

参考:https://zhidao.baidu.com/question/871484643024269932.html

原文地址:https://www.cnblogs.com/rn-05181226-rw/p/7200545.html