#coding=gbk
import xlrd
a=r'C:\Users\db307\Desktop\py\date\test.xlsx'
data=xlrd.open_workbook(a)
table = data.sheets()[0]
nrows = table.nrows #行数
ncols = table.ncols #列数
#col=table.row_values()
a=[]
for i in range(nrows):
row=table.row_values(i)
a.append(row)
print(a)
print('请输入行号和列号查看')
x=int(input());
y=int(input());
print(a[x-1][y-1])
阅读(1334) | 评论(0) | 转发(0) |