http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=3494

解决方案 »

  1.   

    Function ToExcel(ByVal ctl As System.Web.UI.Control)            With HttpContext.Current.Response                .Charset = "UTF-8"
                    .ContentEncoding = System.Text.Encoding.GetEncoding("UTF-8")
                    .ContentType = "Application/ms-excel"            End With
                HttpContext.Current.Response.AppendHeader("content-Disposition", "attachment;filename=" & HttpUtility.UrlEncode(Title1) & ".xls")
                ctl.Page.EnableViewState = False
                Dim tw As System.IO.StringWriter = New System.IO.StringWriter()
                tw.WriteLine(Title1)
                tw.Write(Chr(13) & Chr(10))
                tw.WriteLine(Source)
                Dim hw As System.Web.UI.HtmlTextWriter = New System.Web.UI.HtmlTextWriter(tw)
                ctl.RenderControl(hw)            HttpContext.Current.Response.Write(tw.ToString)            HttpContext.Current.Response.End()        End Function
      

  2.   

    http://xml.sz.luohuedu.net/xml/ShowDetail.asp?id=EC5E84EC-68F9-4CD7-9E11-6F5C92027F0B
      

  3.   

    http://xml.sz.luohuedu.net/xml/ShowDetail.asp?id=EC5E84EC-68F9-4CD7-9E11-6F5C92027F0B