根据文档,您必须使用
write
工作表的方法,而不是作者:
writer = pd.ExcelWriter('Summary Data Request 8 weeks.xlsx')
a.to_excel(writer, sheet_name='Sheet1', startrow=1)
b.to_excel(writer, sheet_name='Sheet1', startcol=7)
c.to_excel(writer, sheet_name='Sheet1', startrow=11)
d.to_excel(writer, sheet_name='Sheet1', startrow=11, startcol=6)
e.to_excel(writer, sheet_name='Sheet1', startrow=21)
f.to_excel(writer, sheet_name='Sheet1', startrow=21, startcol=6)
# Get sheet1
sheet1 = writer.sheets['Sheet1']
sheet1.write('A1', 'Retail Kelontong')
sheet1.write('G1', 'Pulsa')
sheet1.write('A11', 'Minimarket')
sheet1.write('G11', 'Retail dengan barcode')
sheet1.write('A21', 'Retail dengan barcode 2')
sheet1.write('G21', 'Food and Beverage')
writer.save()