How can I post-process the data from an Excel web query when the query is complete?

后端 未结 2 1756
抹茶落季
抹茶落季 2020-12-03 20:44

As a spreadsheet developer, I am trying to stitch together two sets of rows: one from a web query to a web service I own, and the other a set of manual rows added by the spr

2条回答
  •  囚心锁ツ
    2020-12-03 21:09

    An Excel web query utilizes an object called a QueryTable to carry out the business of retrieving and displaying the data.

    A QueryTable can be accessed by VBA.

    And just like the chart object a querytable object has events that can only be responded to by using the WithEvents keyword from a class module, like so:

    Private WithEvents MyQueryTable As QueryTable
    
    Private Sub MyQueryTable_AfterRefresh(ByVal Success As Boolean)
        'Do your post processing here...
    End Sub
    

提交回复
热议问题