python读取excel文件
来源:互联网 发布:霹雳抢购软件 编辑:程序博客网 时间:2024/05/16 23:41
#coding=utf-8import xlrddef print_xls(filename): data=xlrd.open_workbook(filename) #打开excel print "total sheets:", data.nsheets for x in range(data.nsheets): p = data.sheets()[x].name.encode('utf-8') print p.decode('utf-8') table=data.sheets()[1] #打开excel的第几个sheet nrows=table.nrows #捕获到有效数据的行数 for i in range(nrows): ss=table.row_values(i) #获取一行的所有值,每一列的值以列表项存在 #print ss for i in range(len(ss)): print ss[i] #输出一行中各个列的值if __name__=='__main__': print_xls('D:/ml_study/1234.xlsx')
0 0
- Python excel文件读取
- python读取excel文件
- python读取excel文件
- python读取excel文件
- python读取excel文件
- Python读取Excel文件
- python读取excel文件
- python 读取excel文件
- Python读取Microsoft Excel文件
- python简单读取excel文件
- Python读取excel写入到RTF文件
- 读取excel文件并绘制图表[Python]
- 【python】 读取Excel文件并绘制图表
- Python读取excel文件(xlrd,xlwt)
- python读取excel文件(xrld模块)
- 【python】 读取Excel文件并绘制图表
- python使用xlwt读取文件写入Excel
- python读取excel文件—xlrd
- 图形和事件驱动程序 ---------- 画一个简单的笑脸(初学者)
- 粒子群优化算法与遗传脚本
- Note 7 燃损祸起电池三星将加强安全检查措施
- 算法竞赛入门经典第四章
- nyoj7街区最短路径问题
- python读取excel文件
- Python-命名空间
- HDFS Maintenance State
- 玩转树莓派之经验积累
- 计算球的体积
- Rust : 读含有中文字符的CSV文件解决方案
- 15 个 Android 通用流行框架大全
- c# response.write()输出之后怎么换行
- 4. NVIC中断向量配置—基于CT117E开发板的STM32库函数编程