Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I've used this query to calculate distance between two locations, now it won't work anymore, and returns the error xPath query didn't get any result (translated from Italian, I don't know if is the same in English).

This is the query:

=INT(SUBSTITUTE(INDEX(importXML("http://maps.google.com/maps?saddr="&SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE( C5 ;CHAR(13);" ");CHAR(10);" ")); " "; "+")&"&daddr="&SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE( E16 ;CHAR(13);" ");CHAR(10);" ")); " "; "+")&"&ie=UTF8&hl=it&output=mobile&f=d&btnG=Get+Directions" ; "//span[1]" ) ; 1);" km";""))

what's the problem? Should I update this method because it's deprecated?

share|improve this question
some importXML samples that I tried didn't work either. In fact, the example in their Help fails too: =importXml("toysrus.com";; "//a/@href") - support.google.com/docs/bin/answer.py?hl=en&answer=155184 –  mvark Feb 11 '12 at 18:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.