Category : google-sheets

$range1 = new Google_Service_Sheets_GridRange(); $range1->setStartRowIndex(1); $range1->setEndRowIndex(1); $range1->setStartColumnIndex(92); $range1->setEndColumnIndex(92); $range2 = new Google_Service_Sheets_GridRange(); $range2->setStartRowIndex(5); $range2->setEndRowIndex(5); $range2->setStartColumnIndex(92); $range2->setEndColumnIndex(92); $request1 = new Google_Service_Sheets_UpdateCellsRequest(); $request1->setFields(‘BATCHUPDATE’); $request1->setRange($range1); $body1 = new Google_Service_Sheets_Request(); $body1->setUpdateCells($request1); $request2 = new Google_Service_Sheets_UpdateCellsRequest(); $request2->setFields(‘BATCHUPDATE2’); $request2->setRange($range2); $body2 = new Google_Service_Sheets_Request(); $body2->setUpdateCells($request2); $batchUpdateRequest = new Google_Service_Sheets_BatchUpdateSpreadsheetRequest(); $batchUpdateRequest->setRequests([$body1, $body2]); The documentation is confusing, because I tried to do several ways, ..

Read more

I am trying to get the spreadsheet name. But It is not working. Can anyone help me please? I am using php and Google spreadsheet and google drive api: function getSheetTitle($spreadsheetID){ $client = new Google_Client(); $client->setApplicationName(‘Sheets’); $client->setScopes([Google_Service_Sheets::SPREADSHEETS]); $client->setAccessType(‘offline’); $client->setAuthConfig(GOOGLE_CREDENTIALS); $client = GoogleClientSheet(); $service = new Google_Service_Sheets($client); $worksheetSheets = $service->spreadsheets->get($spreadsheetID); return $worksheetSheets->getTitle(); } Sourc..

Read more