Excel file with bubble chart-- saving causes unreadable content error
Created originally on Bitbucket by Charlie Heitzig
We have a fairly complex template Excel file that we’re populating with openpyxl and then saving as another file. The process involves opening the template file each time, populating it with data, and then saving it as a (bunch of) new filenames. We’ve simplified the example down to a template with just two tabs-- one with the bubble chart on it and one with the data (although practically speaking, it could probably be all on one tab if that helps). We also have simplified the openpyxl-calling code down to a four line Python script that just opens, saves, and closes the file. After opening, saving, and closing the file, we get an error from Excel that says “Excel found unreadable content in . Do you want to recover the contents of this workbook? (etc.)” If we recover the file, it removes the bubble chart, but everything else is intact.
Tested with Python 3.7.4 and with openpyxl versions 3.0.3 and 2.6.4
Attachments: opensave.pyReallyReallySimpleTemplate.xlsxsimple_save.xlsx