from collections import OrderedDict
from pyexcel_xls import save_data
def makeExcelFile(path,data):
dic = OrderedDict()
for sheetName,sheetValue in data.items():
d = {}
d[sheetName] = sheetValue
dic.update(d)
save_data(path,dic)
path = r’c:\Users\HP_SSE\Desktop\b.xls’ #不能写入xlsx类型的
makeExcelFile(path,{‘表1’:[[1,2,3],[4,5,6],[7,8,9]],
‘表2’:[[11,22,33],[44,55,66],[77,88,99]],
‘表3’:[[111,222,333],[444,555,666],[777,888,999]]})