I have an issue where sometimes the table number changes in my web query.
The table is always called "table table-striped table-sortable roster"
but sometimes it appears as table 0, but mainly as table 1.
Can you use a table name in the advanced editor instead of the table number ?
Hi Jospeh,
The "table table-striped table-sortable roster" is the CSS class for the table and isn't guaranteed to be unique. The ID of an element should be unique but the website isn't using ID's to identify tables.
So, you can filter the ClassName column to only include the table with the class "table table-striped table-sortable roster" but as I said, that's not guaranteed to always pick a single table, but it does get around using Source{1}[Data]
Here's the query I used
let
Source = Web.Page(Web.Contents("https://www.eliteprospects.com/team/184/ak-bars-kazan")),
#"Filtered Rows" = Table.SelectRows(Source, each ([ClassName] = "table table-striped table-sortable roster")),
Data = #"Filtered Rows"{0}[Data]
in
Data
Regards
Phil
Thank you sir !
much appreciated.
no worries 🙂