This is the VBA code I use in excel:
Workbooks(strX).Sheets(“RAW DATA”).Activate
X = ActiveSheet.QueryTables.Count
Debug.Print X
For i = 1 To X
ActiveSheet.QueryTables(i).Refresh
Debug.Print ActiveSheet.QueryTables(i).Name
Debug.Print ActiveSheet.QueryTables(i).Connection
Next i