Response.Clear()
Response.Buffer = True
Response.Charset = "utf-8"
Response.AppendHeader("Content-Disposition", "inline;filename=FileFlow.xls")
Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8")
Response.ContentType = "Application/vnd.ms-excel"
Me.EnableViewState = False
Dim oStringWriter As New System.IO.StringWriter
Dim oHtmlTextWriter As New System.Web.UI.HtmlTextWriter(oStringWriter)
Me.RenderControl(oHtmlTextWriter)
Response.Write(oStringWriter.ToString())
Response.End()
Response.Buffer = True
Response.Charset = "utf-8"
Response.AppendHeader("Content-Disposition", "inline;filename=FileFlow.xls")
Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8")
Response.ContentType = "Application/vnd.ms-excel"
Me.EnableViewState = False
Dim oStringWriter As New System.IO.StringWriter
Dim oHtmlTextWriter As New System.Web.UI.HtmlTextWriter(oStringWriter)
Me.RenderControl(oHtmlTextWriter)
Response.Write(oStringWriter.ToString())
Response.End()
解决方案 »
- MySQL ,一字段值存的是unicode值,查询出来都是乱码了,求解决方法
- 人脸识别的VeriLook 4.0 sdk如何调用接口 VeriLook_4_0_Extended_SDK_Trial
- 求一个正则表达式~
- aspnetpage难道没得这个属性?
- 关于ASP。NET多核的问题
- 大家看看我的很简单的程序算不算是一个三层架构?
- 初学者学ASP.net(C#)看什么书比较好
- 为什么我做的web上用水晶报表打印的页面,向上或转到等图片无法显示,急、急、急、急
- 绑定时的问题!!!?
- ADO事务问题 高手帮忙啊~~~
- datagrid 和 table
- asp.net中 2个控件的边重合 重合的边颜色会加深 我现在不要这边颜色加深 要怎么解决
Response.AddHeader("Content-Disposition", "attachment; filename=" + sFileName);
Response.ContentType = "application/ms-excel";
Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
//generate excel and close the httpresponse
Response.Write(sw);
Response.End();
sw(StringWriter)里面同一行用\t分隔