导入xlrd模块包,如果导入不了就去cmd里面pip install xlrd就可以了。
import xlrd
data1
= xlrd
.open_workbook
(r
'C:\Users\SPD-SZ-NB004\Desktop\无标题.xls')
table
= data1
.sheet_by_index
(0)
tables
= []
for i
in range(table
.nrows
):
tables
.append
(table
.cell_value
(i
,0))
print(tables
)
转载请注明原文地址: https://lol.8miu.com/read-30024.html