读取xls文件
openpyxl不能读xls, 只能读xlsx文件
import xlrd
infile = 'test.xls'
wb = xlrd.open_workbook(infile)
ws = wb.sheet_by_index(0)
title_values = ws.row_values(0)
for i in range(ws.nrows):
row = ws.row_values(i)
if i == 0:
title = row
continue
context = dict(zip(title, row))
print(context)