i m trying to add a pandas data frame to create a new sheet in an existing excel workbook. it either deletes the workbook and just saves the data frame or it just does not work and it gives me weird errors. "BadZipFile: File is not a zip file" i m not using zip files . here is my code :
import pandas
` from openpyxl import load_workbook
book = load_workbook(target)
writer = pandas.ExcelWriter(target, engine='openpyxl')
writer.book = book
writer.sheets = dict((ws.title, ws) for ws in book.worksheets)
view.to_excel(writer, "FCST Aug 2022")
writer.save()