使用macros从ssrs站点拉出某些表格来优化

我一直在寻找networking两个星期,试图find一个macros从SSRS网站拉某些表,我厌倦了这么多不同的选项,但不断得到错误的信息。

这是我试图从http://apps.aspose.com/ssrs-rendering-extensions/Pages/Report.aspx?ItemPath=%2fAdventureWorks+2008+Sample+Reports%2fCompany+Sales+ 2008年

我试图得到的是这个数据表

2002 2003 Accessories $93,797 $595,014 Bikes $26,664,534 $35,199,346 Clothing $489,820 $1,024,474 Components $3,611,041 $5,489,741 

这是我的macros

 Sub submitFeedback3() marker = 0 Set objShell = CreateObject("Shell.Application") IE_count = objShell.Windows.Count For x = 0 To (IE_count - 1) 'On Error Resume Next ' sometimes more web pages are counted than are open my_url = objShell.Windows(x).Document.Location my_title = objShell.Windows(x).Document.Title If my_title Like "Company Sales" & "*" Then 'compare to find if the desired web page is already open Set IE = objShell.Windows(x) marker = 1 Exit For Else End If Next If marker = 0 Then MsgBox ("A matching webpage was NOT found") 'Dim IE As Object Set IE = CreateObject("InternetExplorer.Application") IE.Visible = True IE.Navigate "http://apps.aspose.com/ssrs-rendering-extensions/Pages/Report.aspx?ItemPath=%2fAdventureWorks+2008+Sample+Reports%2fCompany+Sales+2008" On Error Resume Next Do While IE.Busy: DoEvents: Loop Do Until IE.ReadyState = READYSTATE_COMPLETE: DoEvents: Loop Else MsgBox ("A matching webpage was found") End If Dim TR_col As Object, Tr As Object Dim TD_col As Object, Td As Object Dim row As Long, col As Long Dim html As Object Set html = IE.Document html.getElementById ("oReportDiv") row = 1 col = 1 Set TR_col = html.getElementsByTagName("td") For Each Tr In TR_col Set TD_col = Tr.getElementsByTagName("div") For Each Td In TD_col Cells(row, col) = Td.innerText col = col + 1 Next col = 1 row = row + 1 Next MsgBox ("Done") End Sub 

先谢谢你