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