Skip to content

Because the `google/apiclient` is missing a Google_Service_Spreadsheet component

Notifications You must be signed in to change notification settings

skeeks-semenov/google-spreadsheet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Google Spreadsheet

PHP client for accessing the google drive spreadsheet api. (Because the google/apiclient is missing a Google_Service_Spreadsheet component.)

Installation

composer require noprotocol/google-spreadsheet

Usage example

$client = new Google_Client();
$client->setScopes('https://spreadsheets.google.com/feeds'); // when using ouath, ask for permissions
// other client setup code ...

$service = new SpreadsheetService($client);
$file = $service->getFile($id);
foreach ($file['pages'] as $pageId) {
	$page = $service->getPage($id, $pageId, array('parseHeaders' => true));
	foreach ($page['rows'] as $row) {
		// do stuff...
	}
};

About

Because the `google/apiclient` is missing a Google_Service_Spreadsheet component

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%