ive got a problem.
I want to write a dataframe to an existing Excel-List which contains formulas. When i Open a workbook and use a writer with pandas, it always says there is unreadable content in it and i need to repair it when i open the Excel-List.
Do you know how to resolve this?
Here is my code to write the list:
def Writer():
book = load_workbook(r'C:\Users\List.xlsx')
writer = pd.ExcelWriter(r'C:\Users\List.xlsx',header=None,
index=False, data_only=True)
writer.book = book
writer.sheets = dict((ws.title, ws) for ws in book.worksheets)
datafin=FindReqdata.datafin
datafin.to_excel(writer, sheet_name="SheetName", startrow=2,
startcol=5, index=None, header=None)
writer.save()
Writer()