Download the PHP package survos/google-sheets-bundle without Composer
On this page you can find all versions of the php package survos/google-sheets-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download survos/google-sheets-bundle
More information about survos/google-sheets-bundle
Files in survos/google-sheets-bundle
Package google-sheets-bundle
Short Description This bundle manages Google Spreadsheets using the Google api.
License MIT
Homepage https://github.com/survos/SurvosGoogleSheetsBundle
Informations about the package google-sheets-bundle
credits
Inspired by / Forked from https://github.com/Gabb1995/EXS-GoogleSheetsBundle
Useful references
- https://mzonline.com/blog/2020-06/pushing-data-google-sheets-sheets-yes-multiples
- https://developers.google.com/sheets/api/guides/values
- https://developers.google.com/sheets/api/quickstart/js
- https://www.lido.app/tutorials/google-sheets-group-tabs
EXS-GoogleSheetsBundle
Very simple wrapper for Google sheets integration
What is this bundle doing ?
This bundle provides basic Google API SpreadSheets Sheets Service methods as Symfony services.
Methods: Get|Create|Update|Clear|Delete
Usage
Configuration
-
Set your Google project and get the client secret file.
Click here to obtain your client secret and set project application name -
Save your client secret file as 'client_secret.json' in your project.
- Add the client secret file location, project application name and credential location in the Symfony config file
Your credentials will be created by the bundle once you set the file location in the bundle.
Default location: '/Credentials/sheets.googleapis.com.json'
Create the access token
Create the access token for google api.
-
Execute the service via the command line.
The service will provide you the link to get a verification code. - Copy the verification code from the link then enter it in the command line.
Inputs
id: Spreadsheets id
title: sheet(tab) title
header: number of rows for header.
data: 2 dimensional array for grid data.
Methods
SETUP(Common for all methods).
Inject GoogleSheetsApiService or obtain it from the container.
ex) Set up an api client with the spreadsheets id that you want to manage.
GET
Get an existing spreadsheets
CREATE
Create the new sheet in Google Spreadsheets.
Return: Number of data rows that are inserted to the new sheet.
If you call the function without data, it will create an empty sheet.
ex) Create the new sheet with data
UPDATE
Update the existing spreadsheets sheet.
Return: Number of data rows that are updated to the sheet.
If you wants to update only cell values, not the header, define number of rows for the header.
ex) Update grid data values only.
CLEAR
Clear the entire sheet values.
Return: number of rows that are cleared.
DELETE
Delete the existing sheet in the spreadsheets.
Return: Boolean
Example
Create the new sheet with header then update it with data
All versions of google-sheets-bundle with dependencies
symfony/config Version ^6.4 || ^7.1
symfony/dependency-injection Version ^6.4 || ^7.1
symfony/http-kernel Version ^6.4 || ^7.1
google/apiclient Version ^2.0
symfony/console Version ^6.4 || ^7.1