Reputation: 65
I am using openpyxl (2.3.5). When I create a new workbook and open it with Microsoft Excel, it pops up an error saying:
"We found a problem with some content in 'pourquoi.xlsx'. Do you want us to try to recover as much as we can? If you trust the source of this workbook, Click Yes"
When I click 'Yes', my file is repaired.
Here is the simple code :
>>> import openpyxl
>>> wb = openpyxl.Workbook()
>>> wb.save('pourquoi.xlsx')
Upvotes: 3
Views: 3048
Reputation: 19497
Unfortunately, these error messages are often not very helpful. Which version of Excel are you using? It's worth noting that Excel 2007 is no longer supported.
Bugs should be reported using the bug tracker
For more information you need to look more closely at the file itself, using something like the MS OOXML Productivity Tool. All the files that openpyxl produces are valid OOXML files but Excel can still take exception to valid files.
Upvotes: 2