repeater导成excel如何做
有repeater表要输出成excel表格
请问大人么该如何做
谢谢 --------------------编程问答-------------------- 环境vs2005 vb
--------------------编程问答-------------------- 建议将绑定repeater的数据源导出,可以提供例子代码 --------------------编程问答-------------------- 怪了,vs2005自带的repert view 可以直接导成excel和pdf的 --------------------编程问答-------------------- Response.Clear();
Response.Buffer= true;
Response.Charset="GB2312";
Response.AppendHeader("Content-Disposition","attachment;filename=FileName.xls");
Response.ContentEncoding=System.Text.Encoding.GetEncoding("GB2312");//设置输出流为简体中文
Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。
this.EnableViewState = false;
System.Globalization.CultureInfo myCItrad = new System.Globalization.CultureInfo("ZH-CN",true);
System.IO.StringWriter oStringWriter = new System.IO.StringWriter(myCItrad);
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
this.dgrTop.RenderControl(oHtmlTextWriter);
Response.Write(oStringWriter.ToString());
Response.End(); --------------------编程问答-------------------- repeater只是一个循环显示内部信息的控件而已 --------------------编程问答-------------------- 参考这下:
http://blog.csdn.net/insus/archive/2008/03/31/2231945.aspx
可以把GridView,DataGrid,DataList,Repeater,asp:Table等输出至Word or Excel. --------------------编程问答-------------------- 只要是数据,都可以导出到excel,取出其绑定数据集就可. --------------------编程问答-------------------- 看看这个帖子
http://topic.csdn.net/u/20080526/08/5b8c710e-a0b8-4e85-bfc6-814376749514.html
我的回答
补充:.NET技术 , ASP.NET