string filePath = Server.MapPath("****.xls"); string strTemp = string.Format("attachment;filename={0}", Server.UrlEncode("****.xls")); Response.ContentEncoding = Encoding.GetEncoding("GB2312"); Response.ClearHeaders(); Response.ContentType = "application/ms-excel"; Response.AppendHeader("Content-Disposition", strTemp); Response.BinaryWrite(File.ReadAllBytes(filePath)); Response.End(); Response.Close(); 下载Excel文件ASP.NET 代码