from collections import OrderedDict#有序字典from pyexcel_xls import save_data #读取xls数据 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"D:x.xls" makeExcelFile(path,{"表1":[[3,2,1],[6,5,4],[9,8,7]], "表2":[[31,21,11],[61,51,41],[91,81,71]]})
原文地址:https://www.cnblogs.com/zlong123/p/10508023.html
时间: 2024-10-31 14:07:38