我是 Dundas 的新手,我想将 olap 网格导出到 Excel。我不知道该怎么做。有人可以帮我吗?
问问题
254 次
1 回答
1
我假设 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 图像的解决方案,请告诉我
于 2010-09-21T11:57:33.523 回答