Google Maps Xpath使用Google电子表格IMPORTXML

时间:2015-03-28 02:31:57

标签: google-maps xpath google-maps-api-3 google-sheets google-docs

我正在尝试使用google电子表格中的IMPORTXML功能从谷歌地图结果中提取数据,但我收到错误#N / A

= importxml(http://maps.google.com/maps?q=cosmetic+surgeon+NEAR+New+York%2C+NY%2C+United+States&output=classic&dg=ntvb," // div [@class =' name lname'])

= IMPORTXML(http://maps.google.com/maps?q=cosmetic+surgeon+NEAR+New+York%2C+NY%2C+United+States&output=classic&dg=ntvb,//SPAN[@class=' PP-地方标题'])

但没有任何工作..有任何想法???

由于

1 个答案:

答案 0 :(得分:1)

如果您要将importxml文字字符串作为参数提供,则需要双引号:

=importxml("http://maps.google.com/maps?q=cosmetic+surgeon+NEAR+New+York%2C+NY%2C+United+States&output=classic&dg=ntvb", "//div[@class='name lname']")