Python源码——Excel读

我怕爱的太早我们不能终老 提交于 2020-02-07 12:37:09

Excell 文件---选项---公式---R1C1样式

CMD安装 xlrd

 

pip install xlrd -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

源码————

import xlrd
xlsx = xlrd.open_workbook('D:\地址表.xlsx')
table = xlsx.sheet_by_index(0)
#table = xlsx.sheet_by_name("地址表")
print(table.cell_value(1,2))
print(table.cell(1,2).value)
print(table.row(1)[2].value)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!