如何将repeat控件的数据导入Exel中 我现在需要将repeat控件的数据导入到本地新建的Exel表中,请问各位大侠怎么实现,C#实现 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 System.IO.StringWriter sw = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(sw); this.rpt_Object.RenderControl(hw); Response.Clear(); Response.ContentType = "application/vnd.ms-excel"; Response.Charset = ""; Page.EnableViewState = false; Response.AppendHeader("Content-Disposition", "attachment;filename=Teacher.xls"); Response.Write("<html><head><meta http-equiv=Content-Type content=\"text/html; charset=utf-8\"><title> Copyright by SDU</title></head><body><center>"); Response.Write(sw.ToString()+"<\br>"); Response.Write("</center></body></html>"); Response.End(); 参见http://dotnet.aspx.cc/file/Export-Gridview-To-Excel-With-Multi-Sheet.aspx gridview中edititemplate中的dropdownlist中当前选项问题 一个正则表达式 添加用户控件缓存依赖项发生的异常?高手指正。 DropDownList控件为什么绑定不上数据源。 关于asp.net的问题 如何将html文件转换为jpg等图片的文件 HttpContext.Current.Session 与 Session 有什么区别? 为何页面的样式会丢失? 数据库问题 ASPXWEB里面控制TextArea框。 等待您的回答:运行ASP.NET页面 应用程序脱机 仿网易的动态模板
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(sw);
this.rpt_Object.RenderControl(hw); Response.Clear();
Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";
Page.EnableViewState = false; Response.AppendHeader("Content-Disposition", "attachment;filename=Teacher.xls");
Response.Write("<html><head><meta http-equiv=Content-Type content=\"text/html; charset=utf-8\"><title> Copyright by SDU</title></head><body><center>");
Response.Write(sw.ToString()+"<\br>");
Response.Write("</center></body></html>");
Response.End();
http://dotnet.aspx.cc/file/Export-Gridview-To-Excel-With-Multi-Sheet.aspx