我正在尝试使用现有的Excel作为模板并将数据框附加到其中并希望另存为另一个excel
book = openpyxl.load_workbook('desktop\Template.xlsx')
writer = pd.ExcelWriter('desktop\Template.xlsx',engine='openpyxl',datetime_format='m/d/yyyy hh:mm:ss AM/PM')
writer.book = book
writer.sheets = dict((ws.title, ws) for ws in book.worksheets)
data_f1.to_excel(writer,'Tickets', startrow=1, header=False , index = False)
writer.save()
此外,我正在尝试将日期时间对象的表示形式从pandas更改为所需格式的excel,它不适用于openpyxl