Google API saying getRange(number,.....) not found
<p>I am trying to adapt some functionality from this tutorial for my own ends in AdWords.</p>

<p>This is the function I wish to use.</p>

<pre><code>function getColumnsData(sheet, range, rowHeadersColumnIndex) {
  rowHeadersColumnIndex = rowHeadersColumnIndex || range.getColumnIndex() - 1;
  var headersTmp = sheet.getRange(range.getRow(), rowHeadersColumnIndex, 
  range.getNumRows(), 1).getValues();
  var headers = normalizeHeaders(arrayTranspose(headersTmp)[0]);
  return getObjects(arrayTranspose(range.getValues()), headers);
 }
</code></pre>

<p>However, on running I get the error message,</p>

<blockquote>
  <p>Cannot find method getRange(number,number,number,number).</p>
</blockquote>

<p>Which seems completely crazy. As far as I can see this <a href="http://developers.google.com/apps-script/class_sheet#getRange" rel="nofollow">is core functionality for the adwords API.</a></p>

<p>Am I missing something obvious? I'm passing 4 numerical parameters to <code>getColumnsData</code> when I call it, so even if the range is invalid, it should at least find the method, even if it can't execute properly.</p>
