I have a .xlsm file template (containing macros) which I load (with keep_vba=True) and populate with openpyxl (v2.1.4), then I save it as a new file. When opening the populated file in MS Excel 2013, it throws an error saying:
"We found a problem with some content in 'filename.xlsm'. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes." (Options: Yes, No)
After repairing the file, Excel shows a dialog with title "Repairs to 'filename.xlsm'" and the following content: Info: "Excel was able to open the file by repairing or removing the unreadable content." Text field: "Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded." There is also a link to the log file (XML), but no extra info is given there.
However, it does not seem that the error breaks anything in the file - all the macros, formatting are not affected. The only problem is that the Excel needs to repair something in the file saved by openpyxl.
Could you please help solving this issue?