2

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?

player0
  • 124,011
  • 12
  • 67
  • 124
mubambi
  • 39
  • 3

1 Answers1

1

use:

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

enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124