FarligOpptreden
Executive Member
Nope. When I request the page to be transferred back to the client, I do it as follows:
EDIT: An Office 2007 document IS a zip file, just renamed to the appropriate document type (i.e. docx for Word, xlsx for Excel, etc)
Code:
ExcelWriter writer = new ExcelWriter(dt);
string path = writer.SaveWorkbook();
path = Request.ApplicationPath + "/" + path.Substring(path.IndexOf("Export"));
Response.ClearContent();
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=Custom_Report.xlsx");
Response.WriteFile(path);
Response.End();
HttpContext.Current.ApplicationInstance.CompleteRequest();
EDIT: An Office 2007 document IS a zip file, just renamed to the appropriate document type (i.e. docx for Word, xlsx for Excel, etc)
Last edited: