title: URL Extractor in Google Scripts getting TypeError
body: <p>I'm trying to create a script that will extract hidden hyperlinks from the first column of a google sheet and place just the link in the column to the right.</p>
  <p>This si the code I have so far:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>function getURL() {
    var sheet = SpreadsheetApp.getActiveSheet();
  
    var range = sheet.getLastRow();
  
    for (var i = 1; i&lt;=range; i++){
      var link = sheet.getRange(i, 1).getRichTextValue().getLinkURL();
      sheet.getRange(i, 2).setValue(link);
    }
   
  }</code></pre>
  </div>
  </div>
  </p>
  <p>but I keep getting an error that says:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>TypeError: sheet.getRange(...).getRichTextValue(...).getLinkURL is not a function
  getURL  @ Code.gs:8</code></pre>
  </div>
  </div>
  </p>
  <p>I've looked it up and I believe that getLinkURl should be a function, so I'm not sure what to do. Any help is appreciated -- thanks!</p>