I am trying to automate pulling data from a table on web page. The number of tables on the web page vary per customer. Normally the table I am looking for is table number 10, but sometimes it's not. I'm adding my query to the workbook this way.
ThisWorkbook.Queries.Add _
Name:="Table1", _
Formula:= _
"let" & _
"Source = Web.Page(Web.Contents(" & myURL & "))," & _
"Data1 = Source{10}[Data]," & _
"in" & _
"Data1"
Before loading query results into a worksheet, is there a way to test whether I have the right table? i.e. check if particular columns are present?