title: Google Visualization API Not Respecting GID or Sheet Parameter
body: <p>I'm using the Google Visualization Javascript API to load a Chart from Google Sheets and display it in a div. My app is hosted on Google App Engine. I provide the URL to the sheet with the parameter <code>gid=1</code> to specify the second sheet but the chart the gets displayed is the first sheet. Here's my simplified code (it's basically the example code provided in the documentation):</p>
  
  <pre><code>// sheetUrl is the URL of the Google sheet, e.g., http://https://docs.google.com/a/google.com/spreadsheet/ccc?key=0AobNU9T3MusKdGFqRHNJYkFnb3RuSkt4QlE#gid=1
  // divId is the id of the &lt;div&gt; element I'm displaying in
  
  google.load('visualization', '1.0', {packages: ['table']});
  google.setOnLoadCallback(drawChart);
  
  function drawChart() {
      var query = new google.visualization.Query(sheetUrl);
      query.send(handleQueryResponse);
  }
  
  function handleQueryResponse(response) {
  
      var data = response.getDataTable();
      var table = new google.visualization.Table(document.getElementById(divId));
      table.draw(data);
  }
  </code></pre>
  
  <p>You can see the <code>#gid=1</code> in the URL. I've also tried <code>&amp;gid=1</code> and <code>&amp;sheet='Volume'</code>, which is the name of the tab but when the page loads, the data from the first tab gets rendered.</p>
  
  <p>I have noticed Google sheet urls in the form I have above but also in this form:</p>
  
  <pre><code>https://docs.google.com/spreadsheet/tq?key=0AobNU9T3MusKdGFqRHNJYkFnb3RuSkt4QlE
  </code></pre>
  
  <p>I haven't been able to find any documentation explicitly explaining the tq endpoint. I tried using a URL in this form but I get timeout error when trying to load the chart. Any one run into this problem or have insight in the tq thing? Thanks!</p>
  
  <p><em>Edit 2014-02-17:</em></p>
  
  <p>I've changed my URL to use the tq endpoint and I've tried the following parameters:</p>
  
  <pre><code>#gid=1
  &amp;gid=1
  #sheet=Volume
  &amp;sheet=Volume
  </code></pre>
  
  <p>When I query for the url in the browser:</p>
  
  <pre><code>https://docs.google.com/spreadsheet/tq?key=0AobNU9T3MusKdGFqRHNJYkFnb3RuSkt4QlE&amp;sheet=Volume
  </code></pre>
  
  <p>I get the appropriate sheet back. But when I use the Visualization API to query, I get the first sheet.</p>