eliasrosa / google-sheets
API for Google Sheets
Installs: 80
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/eliasrosa/google-sheets
Requires
- google/apiclient: ^2.0
Requires (Dev)
- phpunit/phpunit: 4.7.*@dev
This package is not auto-updated.
Last update: 2025-10-12 02:45:59 UTC
README
API para acessar planilhas do Google Drive
Download
php composer.phar require eliasrosa/google-sheets
Como usar
// Exemplo // https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit use ER\GoogleClient; use ER\GoogleSheet; $client = new GoogleClient(); $client->setApplicationName('Nome da Aplicação'); $client->setTokenPath(__DIR__ . '/token.json'); $client->setClientSecretPath(__DIR__ . '/client_secret.json'); $client->setToken('TOKEN de Acesso'); // $client = $client->getClient(); $sheet = new GoogleSheet($client); $values = $sheet ->spreadsheets_values ->get('1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms', 'Class Data!A2:E') ->getValues(); if(count($values)) { foreach ($values as $row) { printf( join($row, '|'). "\n"); } }