I just created a script with openpyxl to update a xlsx file that we usually update manually every month.
It work fine, but the new file lost all the graphs and images that were in the workbook. Is there a way to keep them?
I just created a script with openpyxl to update a xlsx file that we usually update manually every month.
It work fine, but the new file lost all the graphs and images that were in the workbook. Is there a way to keep them?
openpyxl version 2.5 will preserve charts in existing files.
Use xlwings instead, it works as a wrapper on pywin32 and can preserve the existing Excel graphs, pivot-tables, etc.