1
給出的函數導出的GridPanel錯誤而出口的GridPanel(EXT)到Excel
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:無法讀取屬性'documentElement'爲null」爲什麼會發生這種情況?