1

给定导出网格面板的功能

    Dim json As String = e.ExtraParams("GridRows")
    Dim eSubmit As New StoreSubmitDataEventArgs(json, Nothing)
    Dim xml As XmlNode = eSubmit.Xml

    Me.Response.Clear()
    Me.Response.ContentType = "application/vnd.ms-excel"
    Me.Response.AddHeader("Content-Disposition", "attachment; filename=submittedData.xlsx")

    Dim xtExcel As New XslCompiledTransform()

    xtExcel.Load(Server.MapPath("Excel.xslt"))
    xtExcel.Transform(xml, Nothing, Me.Response.OutputStream)
    Me.Response.[End]()

导出不起作用,但我可以在执行项目时在窗口错误中看到所有内容,状态代码 200 消息是“BADRESPONSE:无法读取 null 的属性'documentElement'”为什么会发生这种情况?

4

1 回答 1

2

添加IsUpload="True"到您的 DirectEvent

于 2013-07-30T19:15:09.447 回答