如何用python提取excel最后一行数据

更新时间:02-09 教程 由 |唁 分享

如下的回答请参考:

1、导入模块

importxlrd

2、打开Excel文件读取数据

data=xlrd.open_workbook('excelFile.xls')

3、使用技巧

获取一个工作表

table=data.sheets()[0]#通过索引顺序获取

table=data.sheet_by_index(0)#通过索引顺序获取

table=data.sheet_by_name(u'Sheet1')#通过名称获取

声明:关于《如何用python提取excel最后一行数据》以上内容仅供参考,若您的权利被侵害,请联系13825271@qq.com
本文网址:http://www.25820.com/tutorial/14_2106360.html