using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace HySoft.BaseCallCenter.Web.calloutmanage { public partial class callplantaskresultdataexcel : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void exportExcel_Click(object sender, EventArgs e) { string fileName = "回访报表" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls"; Response.Clear(); Response.Charset = "GB2312"; Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312"); Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName)); Response.ContentType = "application/ms-excel"; Response.Write("" + this.htHtmlReport.Value); Response.End(); } } }