Guys, I have a problem here.
String FileName = "FileName.xlsx";
String FilePath = input.PostedFile.FileName;
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
//response.ClearContent();
//response.Clear();
response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
response.AddHeader("Content-Disposition", "attachment; filename=" + FileName );
//response.Flush();
response.End();
I want to download an excel file which is converted from csv plain text file. But everytime I download, I m unable to download excel and open although the download dialogbox is .xlsx. Any suggestion?