45029

Google Maps Xpath using Google Spreadsheet IMPORTXML

Question:

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(<a href="http://maps.google.com/maps?q=cosmetic+surgeon+NEAR+New+York%2C+NY%2C+United+States&output=classic&dg=ntvb" rel="nofollow">http://maps.google.com/maps?q=cosmetic+surgeon+NEAR+New+York%2C+NY%2C+United+States&output=classic&dg=ntvb</a>,"//div[@class='name lname'])

or

=importxml(<a href="http://maps.google.com/maps?q=cosmetic+surgeon+NEAR+New+York%2C+NY%2C+United+States&output=classic&dg=ntvb,//SPAN[@class=" rel="nofollow">http://maps.google.com/maps?q=cosmetic+surgeon+NEAR+New+York%2C+NY%2C+United+States&output=classic&dg=ntvb,//SPAN[@class=</a>'pp-place-title'])

but nothing is working.. Any thoughts???

Thanks

Answer1:

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']")

Recommend

  • Batch: How to store values encountered during a regular expression search & replace (repl.bat)
  • Using ImportXML to pull URL and anchor of link containing the string
  • Import feed to Google Spreadsheet
  • My importXML + xPath + Soundcloud playlist Not Working
  • importXML xPath: Retrieve stock information from website to Google Sheets
  • Localize string from `MonthDay` or `YearMonth` classes in java.time? [duplicate]
  • Bokeh Plot with a nominal or ordinal axis type
  • PHP - Setting inherited static property will also set it in other classes inheriting it
  • Put elements of a 1D vector into a 3D matrix using another matrix of positions
  • How to embed a picture (jpg/png/etc,) into html and email it out with mail
  • How to change my computer's cultureInfo
  • Filter Values of Current Week with XQuery
  • Retrieve RSS feed and display it in text view
  • Sign Key HMAC SHA1 with Javascript
  • php regex remove digits
  • Getting a line that has the coordinates defined by the mouse location
  • Does anyone have a Categorized XML Corpus Reader for NLTK?
  • Embedding a Google map
  • How to force Composer to download a local package?
  • Is it possible to send skype chat messages from a linux server without X?
  • Update Google Maps traffic layer without page reloading
  • Trying to get the char code of ENTER key
  • Android Studio 1.3 RC3. Google Play services out of date. Requires 7571000 but found 6774470
  • android google indoor map
  • Android Google Maps API v2 start navigation
  • Insert new calendar with SyncAdapter- Calendar API Android
  • How can I enlarge video fullscreen without the affected interface project in as3?
  • Seeking advice on Jetty HttpClient Hang
  • Google cloud sdk not working when python points python3
  • Rearranging Cells in UITableView Bug & Saving Changes
  • Circular dependency while pushing http interceptor
  • bootstrap to use multiple ng-app
  • How to get icons for entities from eclipse?
  • Linker errors when using intrinsic function via function pointer
  • using HTMLImports.whenReady not working in chrome
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • Turn off referential integrity in Derby? is it possible?
  • JaxB to read class hierarchy
  • Recursive/Hierarchical Query Using Postgres
  • Android Heatmap on canvas or ImageView