title: How to unprotect a cell on a protected sheet using Google Apps Scripts?
body: <p>I'm trying to unprotect a cell/range, but I'm not managing to include it in the unprotected array.
  Here's the code:</p>
  <pre><code>function irCorte() {
      const sheetCorte = SpreadsheetApp.getActivespreadsheet().getSheetByName('Corte');
      let qtdDeRiscosRng = sheetCorte.getRange(2, 9);
  
      let desprotegerRng = sheetCorte.getRange(qtdDeRiscosRng);//???
  
      var protections = sheetCorte.getProtections(SpreadsheetApp.ProtectionType.RANGE);
      for (var i = 0; i &lt; protections.length; i++) {
        protections[i].setUnprotectedRanges(desprotegerRng);
      }
    }
  </code></pre>
  <p>Thank you!</p>