1
這是我的代碼來下載Excel文件。如何在應用程序中打開Excel文件而不是使用C#在瀏覽器中下載?
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.Charset = "";
HttpContext.Current.Response.ContentType = "application/ms-excel";
HttpContext.Current.Response.AppendHeader("content-disposition", "attachment ; filename=report.xlsx");
我想在Excel中打開它。
winforms或webforms或mvc等等? –
閱讀http://stackoverflow.com/questions/5648347/how-to-open-an-excel-document-using-c-sharp –