【问题标题】:Importxml google spreadsheet parsing formula errorImportxml 谷歌电子表格解析公式错误
【发布时间】:2015-05-09 22:54:29
【问题描述】:

我尝试使用这个公式

=ImportXML("http://www.google.com/search?q=philadelphia seo company&num=100", "//h3[@class='r']/a/@href")

来自http://www.seerinteractive.com/blog/importxml-cookbook/

我得到一个公式错误,你需要在使用这个公式之前在谷歌电子表格中启用一些东西吗?

【问题讨论】:

  • 请提供错误信息,以便我们更好地为您提供帮助。
  • 它对我有用。您使用的是新版 Google 表格吗?
  • 另外,如果您的语言环境使用逗号作为小数分隔符,则您需要在公式中使用分号而不是逗号。

标签: xpath google-sheets xml-parsing


【解决方案1】:

您需要对搜索查询中“q=philadelphia seo company”的部分进行编码,这意味着所有空格都应转换为“%20”。

最终结果应该是这样的:

=ImportXML("http://www.google.com/search?q=philadelphia%20seo%20company&num=100", "//h3[@class='r']/a/@href")

另外 - 我一直使用 importxml 和谷歌搜索结果,你也可以使用“//cite”取决于你想要多少 url。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-12-10
    • 1970-01-01
    • 1970-01-01
    • 2016-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多