python 读取excel数据时间:2023-03-10 02:43:26 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行第一列数据