def load_excel(excel_file):
'''??Excel???????Excel????????????'''
_wb = load_workbook(excel_file, read_only=True)
_ws = _wb.active
_title = []
_items = collections.OrderedDict()
for _r in _ws.rows:
if not _title:
for _i in _r:
_title.append(_i.value)
else:
_item = []
for _i in _r:
_item.append(_i.value)
_items[_item[0]] = _item
_wb.close()
return _title, _items
评论列表
文章目录