Export to excel
来源:互联网 发布:淘宝品牌折扣店推荐 编辑:程序博客网 时间:2024/05/16 01:18
protected void Button1_Click(object sender, EventArgs e)
{
Response.Clear();
Response.Buffer = true;
Response.Charset = "GB2312";
Response.AppendHeader("Content-Disposition", "attachment;filename=FileName.xls");
// 如果设置为 GetEncoding("GB2312");导出的文件将会出现乱码!!!
Response.ContentEncoding = System.Text.Encoding.UTF7;
Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
this.GridView1.RenderControl(oHtmlTextWriter);
Response.Output.Write(oStringWriter.ToString());
Response.Flush();
Response.End();
}
- Export DataSets to Excel...
- export to excel
- Export GridView to Excel
- Export to excel
- Export to Excel
- EXCEL export to TXT
- Export to excel
- Proceduce Export Table To Excel
- ASP:Export to Excel (1)
- ASP: Export to Excel (2)
- Export to Excel user Control
- Export to Excel from Repeater
- excel export to latex table
- export grid to excel fast and wyswyg
- Export ASP.NET DataGrid To Excel
- export data from DataGrid to Excel
- C# Color List & Export to Excel
- export grid to excel fast and wyswyg
- ruby中获取当前脚本文件的路径
- 想成为嵌入式程序员应知道的0x10个基本问题
- [ZZ]C++特性探寻-可变参数和参数进栈顺序。
- 6个非常有用的 CSS 资源网站
- 编程之路┊由C#风潮想起的——给初学编程者的忠告
- Export to excel
- 设计网页-宽度设置多少合适
- C3P0数据库连接池因网络阻塞出现的问题
- DES加密解密
- 全文检索引擎 - Ludia
- jstl 标签
- How Tomcat Works 1
- JAVA存储过程Oracle+MYSQL
- 论IT行业销售人员的素质分类:销售知识