1. 程式人生 > >ASP.NET中將網頁HTML源碼保存到Excel下載

ASP.NET中將網頁HTML源碼保存到Excel下載

mmd clear views pos 下載 ati 內容 viewstate resp

下邊內容是關於ASP.NET中將網頁HTML保存到Excel下載的內容。
Response.Clear();
Response.Buffer= true;
Response.AppendHeader("Content-Disposition","attachment;filename="+DateTime.Now.ToString("yyyyMMdd")+".xls");
Response.ContentEncoding=System.Text.Encoding.UTF8;
Response.ContentType = "application/vnd.ms-excel";
this.EnableViewState = false;




ASP.NET中將網頁HTML源碼保存到Excel下載