Getting AttributeError 'Workbook' object has no attribute 'add_worksheet' - while writing data frame to excel sheet

前端 未结 3 459
北海茫月
北海茫月 2021-01-14 01:13

I have the following code, and I am trying to write a data frame into an "existing" worksheet of an Excel file (referred here as test.xlsx). Sheet3 is the targeted

3条回答
  •  抹茶落季
    2021-01-14 01:50

    openpyxl has support for Pandas dataframes so you're best off using it directly. See http://openpyxl.readthedocs.io/en/latest/pandas.html for more details.

提交回复
热议问题