Author: ankit2012 | Posted on: 2/26/2009 4:15:54 AM | Views : 356

When I try to export a GridView to Excel 2007 I get an error message:

The file you are trying to open < > 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? <Yes> <No>

This worked OK with Excel 2003. I am working on .Net 2008.

Please Help

context.Response.AddHeader("content-type", "application/vnd.ms-excel");
context.Response.AddHeader("content-disposition", "attachme ...

Go to the complete details ...