'how to add data frame to existing excel work book

'`import pandas from openpyxl import load_workbook

mypath="C:\Users\egoyrat\Desktop\smt tracker\Swap Manual Tracking_v1 (12).xlsx" wb = load_workbook(mypath,read_only=False) wb_ws= wb['Main']

    for row in dataframe_to_rows(now_append, header = False, index = False):
    wb_ws.append(row)

wb.save(mypath) # save workbook wb.close()

writer.save()
writer.close()` 

I have done this but it is not proper working, data is appending bt not particular column



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source