ASP.NET - The file you are trying to open, (file name), is in a different format than specified by

Asked By reenu Ch on 26-Jun-12 03:35 AM
Earn up to 10 extra points for answering this tough question.
Hi

Import and Export Excel to Sql and Sql to Excel works fine

but
when open the data in Excel  2007 Shows the Following Worning Message,


"The file you are trying to open, (file name), is in a different format than specified by the file extension...
Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"

[)ia6l0 iii replied to reenu Ch on 26-Jun-12 10:14 PM
There is a concept known as "Exception Hardening" introduced in Office 2007 suite. Unfortunately this adds to some serious annoyance. You can either turn it off or leave it on if you receive data from multiple sources.

There is a Microsoft Knowledge Base Article @ http://support.microsoft.com/kb/948615 which explains more about this message, and how to turn it off.

Good one!