Exclude certain class of table data from XMLIMPORT

Viewed 55

I'm trying to retrieve the data from the table on this website, in Sheets:

https://www.basketball-reference.com/leagues/NBA_2021_totals.html

When I use this simple formula: =IMPORTXML(A1,"//tr"), I am able to get the whole table BUT it is including the table headers that show up every 20 rows: RK, Player, Pos, Age, Team, etc...

Is there a way to only fetch the table rows with player data?

1 Answers

use:

=QUERY(IMPORTXML(A1, "//tr"), "where Col2 <> 'Player'", 1)

enter image description here

Related