问题
I am trying to use Pull data from google maps results using IMPORTXML function in google spreadsheet but I am getting error #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'])
or
=importxml(http://maps.google.com/maps?q=cosmetic+surgeon+NEAR+New+York%2C+NY%2C+United+States&output=classic&dg=ntvb,//SPAN[@class='pp-place-title'])
but nothing is working.. Any thoughts???
Thanks
回答1:
If you're going to give importxml literal strings as arguments, they need to be double-quoted:
=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']")
来源:https://stackoverflow.com/questions/29313012/google-maps-xpath-using-google-spreadsheet-importxml