Hi,
I have excel file on my server and I want to send it client side.
I have the follwing code
Response.Buffer = true;
Response.ClearContent();
Response.ContentType = "application/ms-excel";
Response.AddHeader("Content-Disposition", @"attachment;filename=" + fileName);
Response.Charset = "";
Response.TransmitFile(Server.MapPath(fileName));
HttpContext.Current.ApplicationInstance.CompleteRequest();
System.Runtime.InteropServices.Marshal.ReleaseComObject(excel);
System.Runtime.InteropServices.Marshal.ReleaseComObject(workbook);
On client side I m receiving the file but it has Page contents and not the contents which i have saved in it.
Please help.
Thanks
Ashok