python 读取excel数据

import xlrd

book = xlrd.open_workbook(file_path)#打开文件
sheet = book.sheet_by_index(0)  #获取第一个工作簿
print sheet.nrows,sheet.ncols  #打印行数,列数
for i in range(sheet.nrows):
    print sheet.row(i)[0].value  #遍历第i行第一列数据
原文地址:https://www.cnblogs.com/pxfb/p/9618360.html