Refresh OLE DB Query using Powershell

Copper Contributor

Hello,

 

I have an Excel model with powerquery connections which I need to refresh.

 

The .RefreshAll() command refreshes all the connections and the pivot tables in the workbook but I want to refresh only the connections and not the pivot tables

 

How do I accomplish this?

 

 

Here's an example of the one of the connections:

 

 

Application : Microsoft.Office.Interop.Excel.ApplicationClass

Creator : 1480803660

Parent : System.__ComObject

Name : Query - Fetch_AIO (REF) (4)

Description : Connection to the 'Fetch_AIO (REF) (4)' query in the workbook.

_Default : Query - Fetch_AIO (REF) (4)

Type : 1

OLEDBConnection : System.__ComObject

ODBCConnection :

Ranges : System.__ComObject

ModelConnection :

WorksheetDataConnection :

RefreshWithRefreshAll : True

TextConnection :

DataFeedConnection :

InModel : False

ModelTables

0 Replies