0
我是Dundas的新手,我想將olap網格導出爲excell。我不知道該怎麼做。有人可以幫助我嗎?任何人都可以給我一個關於如何導出Dundas OLAP網格excell的想法
我是Dundas的新手,我想將olap網格導出爲excell。我不知道該怎麼做。有人可以幫助我嗎?任何人都可以給我一個關於如何導出Dundas OLAP網格excell的想法
我承擔ASP版本:
Dim myResponse As HttpResponse = HttpContext.Current.Response
Dim strm As System.IO.Stream = New System.IO.MemoryStream
Dim strToExport As String
OlapGrid.Export(strm)
Dim streamReader As New System.IO.StreamReader(strm)
strm.Position = 0
strToExport = streamReader.ReadToEnd
Try
myResponse.Clear()
myResponse.Buffer = False
myResponse.AddHeader("content-disposition", "attachment;filename=Report2Excel.xls")
myResponse.ContentEncoding = System.Text.Encoding.Default
myResponse.ContentType = "application/vnd.xls"
myResponse.Charset = ""
myResponse.Write(strToExport)
Catch ex As Exception
Finally
myResponse.[End]()
End Try
順便說一句,如果你知道在網格中的KPI圖像的解決方案讓我知道
THX您的回覆,另外,我得到了它的工作這裏是代碼片段。 (this.IsCallback) {return; – Nathan 2010-09-27 15:44:49
if(this.IsCallback) {return; } Byte [] renderedBytes = _presenter.GetRenderedBytes(new MemoryStream(),OlapClient1);如果(renderedBytes!= null && renderedBytes.Length> 0) {exporting = true; Response.ClearHeaders(); Response.Buffer = true; Response.ContentType =「application/vnd.ms-excel」; // 「應用/ PDF」; Response.AddHeader(「content-disposition」,「attachment; filename = temp.xls」); Response.BinaryWrite(renderedBytes); Response.Flush(); – Nathan 2010-09-27 15:46:15
試試KPI圖片http://documentation.devexpress.com/#WindowsForms/CustomDocument8390http://documentation.devexpress.com/#WindowsForms/CustomDocument8390 – Nathan 2010-09-27 15:55:34