Naveen Kumar

Naveen Kumar

  • NA
  • 73
  • 4.8k

Getting Alert . While Opening a Excel sheet.

Jul 24 2014 6:36 AM
 
Hi...
 
I am generating a report the Data to Excel sheet.
 
 The data gets generating but When  i am trying to Open the Excel sheet document . shows the alert message like this.
 
The file you are trying to open abc.xls is in different format than specified by the extension. Verify that the file is not corrupted and is from trusted source before openong the file. Do you want to open the file now ??
 
And than i click Yes it's opening  No issues
 
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-disposition","attachment;filename=abc.xls) 
 
Can any one help me to get rid of this alert message

Answers (5)