Tengis Tengis - 2 years ago 256
Python Question

Pandas: can not write to excel file

Trying this example from the documentation

writer = ExcelWriter('output.xlsx')

I found out that I can not write to an excel file with the error

TypeError: copy() got an unexpected keyword argument 'font'

I'm using Panda 0.16 on a Mac pro.

writing to an xls file worked just fine. I do not insist in having an xlsx file, just wonder why it does not work.

Answer Source

For fast solution replace this

xcell.style = xcell.style.copy(**style_kwargs)



At pandas/io/excel.py line 778.

openpyxl upgraded their api and pandas also need to be updated for support openpyxl.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download