Excel cannot open the file "email-db5172013104809AM.xls" because the file format or extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.
i am import this excel file from asp.net listview on button click event
Response.Clear();
Response.AddHeader("content-disposition", "attachment; filename=" + "email-db" + System.DateTime.Now.ToString().Replace("/", "").Replace(":", "").Replace(" ", "") + ".xls");
Response.Buffer = true;
Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";
this.EnableViewState = false;
StringWriter stringWriter = new StringWriter();
HtmlTextWriter htmlTextWriter = new HtmlTextWriter(stringWriter);
string emaildb = "&q ...
Go to the complete details ...