You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In one sheet its work fine. I try to get cells from another sheet document and it became impossible.
I always get this errors, event try to do it from owner accont. Owner accaunt work fine with another sheet docs too.
Errors:
Warning: count(): Parameter must be an array or an object that implements Countable in /directory/import/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 67
Warning: count(): Parameter must be an array or an object that implements Countable in /directory/import/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 67
Fatal error: Uncaught Google_Service_Exception: { "error": { "code": 400, "message": "This operation is not supported for this document", "errors": [ { "message": "This operation is not supported for this document", "domain": "global", "reason": "failedPrecondition" } ], "status": "FAILED_PRECONDITION" } } in /directory/import/Google/vendor/google/apiclient/src/Google/Http/REST.php:118 Stack trace: #0 /directory/import/Google/vendor/google/apiclient/src/Google/Http/REST.php(94): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...') #1 /directory/import/Google/vendor/google/apiclient/src/Google/Task/Runner.php(181): Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...') #2 /directory/import/Google/ven in /directory/import/Google/vendor/google/apiclient/src/Google/Http/REST.php on line 118
In one sheet its work fine. I try to get cells from another sheet document and it became impossible.
I always get this errors, event try to do it from owner accont. Owner accaunt work fine with another sheet docs too.
Errors:
Warning: count(): Parameter must be an array or an object that implements Countable in /directory/import/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 67
Warning: count(): Parameter must be an array or an object that implements Countable in /directory/import/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 67
Fatal error: Uncaught Google_Service_Exception: { "error": { "code": 400, "message": "This operation is not supported for this document", "errors": [ { "message": "This operation is not supported for this document", "domain": "global", "reason": "failedPrecondition" } ], "status": "FAILED_PRECONDITION" } } in /directory/import/Google/vendor/google/apiclient/src/Google/Http/REST.php:118 Stack trace: #0 /directory/import/Google/vendor/google/apiclient/src/Google/Http/REST.php(94): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...') #1 /directory/import/Google/vendor/google/apiclient/src/Google/Task/Runner.php(181): Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...') #2 /directory/import/Google/ven in /directory/import/Google/vendor/google/apiclient/src/Google/Http/REST.php on line 118
Sample:
` <?
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
require_once DIR . '/Google/vendor/autoload.php';
$client = new \Google_Client();
$client->setApplicationName('Google sheet and PHP');
$client->setScopes([\Google_Service_Sheets::SPREADSHEETS_READONLY]);
$client->setAccessType('offline');
// $client->setAuthConfig(DIR.'/EraVitex-ec458f567057.json');
$client->setAuthConfig(DIR.'/Eravitex-736c25228468.json'); #prokh.sergey
$service = new Google_Service_Sheets($client);
// var_dump($service);
// $spreadsheetId = "1AUGdmO645L4n-mHH9vxgTAUmPG2vkhqmtay5-9w66Ak";
// $spreadsheetId = "1mKLemNR2VMDj_wE5crSiR11-mq8VrirVcjCAJ4Caq_k"; //-new
$spreadsheetId = "1QrfFUFTsMNHTM3SPvD24_Y2WXM64WcdI";
// $range = "Ковщики!A1:B10";
$range = "TIU!A1:B10";
$response = $service->spreadsheets_values->get($spreadsheetId, $range);
$values = $response->getValues();
if (empty($values)){
echo 'no data';
}
else{
$mask ="%10s %-10s %s\n";
foreach ($values as $row){
echo $row[0].'-'.$row[1]."\n";
}
}
?>`
Steps to Reproduce the Problem
Specifications
The text was updated successfully, but these errors were encountered: