posts - 116,  comments - 34,  trackbacks - 0
Response.Clear()
        Response.Buffer = True
        Response.Charset = "GB2312"
        Dim st As Integer = DateDiff(DateInterval.WeekOfYear, CDate(Session("Weekreport").ToString.Substring(0, 4) + "/1/1"), Session("Weekreport")) + 1
        Dim filename As String = "attachment;filename=WeekReportBM" + st.ToString + ".xls"
        Response.AppendHeader("Content-Disposition", filename)
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312") '//设置输出流为简体中文
        Response.ContentType = "application/ms-excel" '//设置输出文件类型为excel文件。
        Me.EnableViewState = False
        Dim myCItrad As System.Globalization.CultureInfo = New System.Globalization.CultureInfo("ZH-CN", True)
        Dim oStringWriter As System.IO.StringWriter = New System.IO.StringWriter(myCItrad)
        Dim oHtmlTextWriter As System.Web.UI.HtmlTextWriter = New System.Web.UI.HtmlTextWriter(oStringWriter)
        Me.Panel1.RenderControl(oHtmlTextWriter)
        Response.Write(oStringWriter.ToString)
        Response.End()
posted on 2005-10-26 16:09 萌芽的叶子 阅读(247) 评论(0)  编辑 收藏 引用 所属分类: datagrid
只有注册用户登录后才能发表评论。

<2005年10月>
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

常用链接

留言簿(3)

随笔分类(115)

随笔档案(116)

文章分类(4)

相册

收藏夹(78)

.net中文社区

.net博客

.net英文社区

AJAX

ASP.NET 2.0

ASP.NET 学习

DataBase

ERP

E杂志

Html&Css

JavaScript

Microsoft

Open Sourse

SAP

WebCasts

WebServices

XML

其他

好友Blog

好文章连接

开发工具

控件

物流

职业经理人

设计模式

读书网站

非技术

项目管理

搜索

  •  

积分与排名

  • 积分 - 57159
  • 排名 - 106

最新评论

阅读排行榜

评论排行榜