不使用openpyxl engine 替换成xlsxwriter
23
The same problem happened to me. I solved it as follows:
- install python package xlsxwriter:
pip install xlsxwriter
- replace the default engine 'openpyxl' with 'xlsxwriter':
dataframe.to_excel("file.xlsx", engine='xlsxwriter')