62,243
社区成员




System.IO.StringWriter sw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(sw);
this.Repeater1.RenderControl(hw);
Response.Clear();
Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";
Page.EnableViewState = false;
Response.AppendHeader("Content-Disposition", "attachment;filename=" + sDayTime.Text + "—" + eDayTime.Text + "按年统计报表.xls");
string html = "<html><head><meta http-equiv=Content-Type content=\"text/html; charset=GB2312\"><link href=\"http://" + Request.Url.Authority + "/_media/css/Frame.css\" type=\"text/css\" rel=\"stylesheet\" /> <style>td{line-height:1;}</style><title>报表</title></head><body >";
html += sw.ToString();
html += "</body></html>";
Response.Write(html);
Response.End();