$sheet_id = 'xxxxxxxxxxxxxxxyyyyyyyyyyyyyyyy';
// contoh ID spreadsheet yang akan di isi data
$range = "Sheet1!A4"; /// tab Sheet1 di sell A4 pada spredsheet
$myValue = "Hello Word"; /// kata'Hello Word" yang akan di entry pada Sheet1 di sell A4
$updateBody = new Google_Service_Sheets_ValueRange([
'range' => $range,
'majorDimension' => 'ROWS',
'values' => [
[$myValue]
]
]);
$service->spreadsheets_values->update(
$sheet_id,
$range,
$updateBody,
['valueInputOption' => "RAW"]
);
$results = $service->spreadsheets_values->get(
$sheet_id, $range
);
}
echo '<pre>', var_export($results, true), '</pre>', "\n"; /// menapilkan respon notifikasi
Semoga bermanfaat !!
ConversionConversion EmoticonEmoticon