Chinaunix首页 | 论坛 | 博客
  • 博客访问: 232091
  • 博文数量: 59
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 592
  • 用 户 组: 普通用户
  • 注册时间: 2014-04-01 12:51
个人简介

你们都是我的客户,所以,我对你们是透明的

文章分类

全部博文(59)

文章存档

2016年(29)

2015年(30)

分类: Python/Ruby

2015-12-24 16:53:54

#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])
阅读(1298) | 评论(0) | 转发(0) |
0

上一篇:python小记

下一篇:python txt 写入excel

给主人留下些什么吧!~~