Python源码---Excell读

Posted guowei2020

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python源码---Excell读相关的知识,希望对你有一定的参考价值。

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)

以上是关于Python源码---Excell读的主要内容,如果未能解决你的问题,请参考以下文章