I'm using php to write data into google sheets. However, the trigger onEdit function on google sheets isn't firing when the data is written from the php. Here's the piece of code I used to write down the data:
$body = new Google_Service_Sheets_ValueRange(array('values' => $resultArrayGen));
$params = array('valueInputOption' => $valueInputOption);
$range = 'Main!F2:K';
$result = $service->spreadsheets_values->update($spreadsheetId, $range, $body, $params);
Is there anyway to use google services sheets api to trigger the onEdit function in google spreadsheets?
Thanks
The onEdit trigger wont fire according to Google's documentation:
Script executions and API requests do not cause triggers to run. For example, calling Range.setValue() to edit a cell does not cause the spreadsheet's onEdit trigger to run.
You can find it here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With