【问题标题】:Import XML into Google Sheets将 XML 导入 Google 表格
【发布时间】:2018-10-20 19:20:24
【问题描述】:

我正在尝试从网站导入一些数据,这些数据每月在谷歌表格中更新。我对这个数字特别感兴趣:“1910”see this picture

我输入了:

=IMPORTXML("https://ratings.fide.com/card.phtml?event=36050601";"//table[@class='contentpaneopen']/tr[2]//tr[1]//tr[4]//tr[1]/td[1]")

我的问题是它同时导入了std.1910,因为它们在同一个单元格中。 是否有可能摆脱这个std. 并只导入值1910

【问题讨论】:

    标签: xml xpath google-sheets


    【解决方案1】:

    你可以像这样使用 index 来获取第三个返回值:

    =index(IMPORTXML("https://ratings.fide.com/card.phtml?event=36050601","//table[@class='contentpaneopen']/tr[2]//tr[1]//tr[4]//tr[1]/td[1]"),0,3)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-11
      • 1970-01-01
      • 2023-03-08
      • 1970-01-01
      相关资源
      最近更新 更多