从 XMLIMPORT 中排除某些 class 的 table 数据
Exclude certain class of table data from XMLIMPORT
我正在尝试从该网站的 table 表格中检索数据:
https://www.basketball-reference.com/leagues/NBA_2021_totals.html
当我使用这个简单的公式时:=IMPORTXML(A1,"//tr")
,我能够得到整个 table 但它包括每 20 次出现的 table headers行:RK、球员、位置、年龄、球队等...
有没有办法只获取玩家数据的 table 行?
使用:
=QUERY(IMPORTXML(A1, "//tr"), "where Col2 <> 'Player'", 1)
我正在尝试从该网站的 table 表格中检索数据:
https://www.basketball-reference.com/leagues/NBA_2021_totals.html
当我使用这个简单的公式时:=IMPORTXML(A1,"//tr")
,我能够得到整个 table 但它包括每 20 次出现的 table headers行:RK、球员、位置、年龄、球队等...
有没有办法只获取玩家数据的 table 行?
使用:
=QUERY(IMPORTXML(A1, "//tr"), "where Col2 <> 'Player'", 1)