【在线读报源码】【源码如何转补码】【中台整体源码】silverlight 源码

2024-11-08 04:32:11 来源:模块源码大全 分类:综合

1.silverlight中的datagrid导出excel

silverlight 源码

silverlight中的datagrid导出excel

       ç”¨ASPX页面 就行了,在线读报源码不要用银光

       Private Sub excel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

        With Response

        .Buffer = True

        .ContentType = "application/vnd.ms-excel "

        .ContentEncoding = System.Text.Encoding.GetEncoding( "utf-8 ")

        End With

        DataGrid_CXMONEY.EnableViewState = False

        Dim tw As New System.IO.StringWriter()

        Dim hw As New System.Web.UI.HtmlTextWriter(tw)

        DataGrid_CXMONEY.RenderControl(hw)

        Response.Write(tw.ToString())

        Response.End()

       end sub

       GRID在放在ASPX页面上,绑定数据源

       è¿™æ ·å¯¼å‡ºéžå¸¸å¿«,比自己递归填充XLS单元格不知道快多少.

       ä½†æœ‰ä¸ªç¼ºé™·å°±æ˜¯åªèƒ½çœ‹,做统计时会有问题.

       å› ä¸ºå…¶å®žè¿™æ®µä»£ç åŽŸç†å°±æ˜¯ç”¨XLS中显示HMTL而已,跟真正的XLS源代码有区别的

本文地址:http://5o.net.cn/news/7a51999473.html 欢迎转发