We're using SSRS 2017 as our report server with ReportService2010.asmx and ReportExecution2005.asmx as the web references. When I export the report to Excel in the reporting server or project, it exports to .xlsx file and I'm able to open it without any issues but when I export the report to .xlsx (EXCELOPENXML) using a web forms app (C#), it exports the report but shows an alert "We found a problem with some content..." (see image) when opening the file. If I say, "Yes", excel repairs the file and shows the correct data. Error log is also not very helpful.
I don't know what is causing the web forms app to export an corrupted .xlsx file. Any help is appreciated. Thanks.