title: How to update multiple cells via the Google Sheets API?
body: <p>I'm trying to update and get some results from google sheets, it's working but slow. I need to <code>batchUpdate</code> and get the data.</p>
  
  <p>This is my script</p>
  
  <pre><code>foreach ($import_cels as $celu =&gt; $valoare) {
      $range_ins = $celu;
      $valueRange-&gt;setValues(["values" =&gt; [$valoare]]);
      $service-&gt;spreadsheets_values-&gt;update($spreadsheetId, $range_ins, $valueRange, $conf);
  }
  
  foreach ($cells_to_get as $celu =&gt; $valoare) {
      $response = $service-&gt;spreadsheets_values-&gt;get($spreadsheetId, $celu);
      $values = $response-&gt;getValues()[0][0];
      echo "each cell :" . $values;
  }
  </code></pre>
  
  <p>The problem: I have too many requests because I update the cells one by one and extract them the same.</p>
  
  <p>I need to batch update the cells and get them like</p>
  
  <pre><code>B12 =&gt; 3
  BB1 =&gt; 1
  CC3 =&gt; 4
  </code></pre>