I have an application which exports data into .xlsx format. The Excel file of .xlsx format is created through OpenXML. While trying to open it, it gives error "Excel found unreadable content in (filename). Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes." If click Yes, the file opens with another message giving log file of the repair. Once it's opened, I save the file with other name and now if I try to open the second file, it opens fine.
This only happens with Office 2010, with Microsoft Office 2007 it works fine. I've even tried to create a small application (just to be sure is not related to my code) exactly the same as in this link small application. The issue remained the same: I was able to open the Excel file fine in 2007, but in Microsoft Office 2010 it gave the same error. I've searched in Google, no results. I can't change the file to resolve the issue once it's created. I only need to make changes in the code to solve the issue.