reverse/g-sheets

This package is abandoned and no longer maintained. No replacement package was suggested.

Google Sheets client library

Maintainers

Details

github.com/r-everse/GSheets

Source

Installs: 14 276

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 1

v0.0.3-alpha 2019-04-08 12:26 UTC

This package is auto-updated.

Last update: 2021-09-27 11:08:17 UTC


README

This package is deprecated and will soon be removed. We suggest using google/apiclient directly.

reverse/g-sheets

Build Status Scrutinizer Code Quality

PHP client for Google Sheets.
This library provides a set of class and methods to work with Google Api Client for PHP google/apiclient.

Requirements

  • php >= 5.6

Installation

composer require reverse/g-sheets:"dev-master"

Using GSheets

To work with Google Sheets have to init Client and Spreadsheets classes.

$googleClient = new \Google_Client($config);
$client = new Client($googleClient);
spreadsheets = new Spreadsheets($client, 'sheetid'); 

Operations

Append

$value = new Value('a', 'b', 'c');
$spreadsheets->append($value, 'Sheet1');

Update

$value = new Value('a', 'b', 'c');
$spreadsheets->update($value, 'Sheet1');

Clear

$spreadsheets->clear('Sheet1!1:2');

Get

// This get return Sheet1's first column
$spreadsheets->get('Sheet1!1:1');

Delete

// This call delete first row of sheets specified
// sheetId is gid not sheet's name
$delete->execute(Delete::DIMENSION_ROWS, '12675hakas', 0, 1);