python简单读excel文件

上一篇 / 下一篇  2016-03-25 16:34:24 / 个人分类:python

# -*- coding: utf-8 -*-
import xlrd
def read_excel():
    workbook = xlrd.open_workbook(r'E:\python_test\op_xlrd.xlsx')
    sheet2=workbook.sheet_by_index(1)
    for i in range (sheet2.ncols-1):#遍历有数据的excel表格
        for j in range (sheet2.nrows-1):
            print sheet2.cell(i,j).value
                
if __name__ == '__main__':
    read_excel()   

TAG: Excel Python python excel

~~简简单单~~~ 引用 删除 67867643   /   2016-03-27 17:12:14
 

评分:0

我来说两句

我的栏目

日历

« 2024-04-05  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 16785
  • 日志数: 18
  • 书签数: 3
  • 建立时间: 2016-03-21
  • 更新时间: 2017-09-11

RSS订阅

Open Toolbar