title: Using importxml with key in Google Spreadsheets to fetch from Directions API
body: <p>I am using Google Spreadsheets to populate a table of times between different points on a map, and am using importxml to do so.</p>
  
  <p>It works fine as a test, however I cannot figure out how to also append a key that I got for the Maps API. Where do I insert it in the code line? Or am I missing something? Can't find any usage samples on the net.</p>
  
  <p>The code itself looks like this for a random cell (L9 in this case):</p>
  
  <pre><code>=if(J10="","",if(J9="","",importxml("http://maps.googleapis.com/maps/api/directions/xml?origin=" &amp; if(J9=1,vlookup($B$1,database!$A$1:$D,4,FALSE),vlookup(J9,database!$E$1:$H,4,FALSE)) &amp; "&amp;destination=" &amp; vlookup(J10,database!$E$1:$H,4,FALSE) &amp; "&amp;sensor=false&amp;alternatives=false","//leg/duration/value"))/1440/60)
  </code></pre>