Download the PHP package silinternational/google-sheets-php without Composer
On this page you can find all versions of the php package silinternational/google-sheets-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download silinternational/google-sheets-php
More information about silinternational/google-sheets-php
Files in silinternational/google-sheets-php
Download silinternational/google-sheets-php
More information about silinternational/google-sheets-php
Files in silinternational/google-sheets-php
Vendor silinternational
Package google-sheets-php
Short Description A simple library for pushing data to a Google Sheet using the Google PHP API Client version 1
License MIT
Package google-sheets-php
Short Description A simple library for pushing data to a Google Sheet using the Google PHP API Client version 1
License MIT
Please rate this library. Is it a good library?
Informations about the package google-sheets-php
Google Sheets PHP
A simple library for pushing data to a Google Sheet using the Google PHP API Client version 1.
Authorization
To use this library to push data to a Google Sheet...
- Go to the Google Developers Console.
- If you do not yet have a project that you plan to use this with, create one.
- Enable the "Google Sheets API" for that project.
- Create credentials for the project:
- To use the Google Sheets API
- From a web server
- To access application data
- Not using Google App Engine or Computer Engine
- Give it a service account name
- Don't give it a role
- Select the JSON key option
- Save that JSON file to some private folder where your code can access it.
- Get the Spreadsheet ID of the Google Sheet that you want to push data to. It is shown in its URL after the "https://docs.google.com/spreadsheets/d/" prefix, up until the next "/".
- Share that Google Sheet (cf. the spreadsheet ID) with the
client_email
value found in your Google credentials JSON file, giving it permission to edit the spreadsheet.
Viola! You should now be able to push data to that Google Sheet.
Testing
To test this library (and that your permissions are set up correctly)...
- Clone this repo to your local machine.
- Put your JSON credentials file in the "credentials" folder (Git is set to ignore that folder's contents... DO NOT COMMIT YOUR JSON FILE TO GIT).
- Copy the
local.env.dist
file tolocal.env
, giving it the requested values. - Open a terminal to the root of the repo and run
make
. - Look at your Google Sheet and verify that data has been appended.
Resources
How to use the Google PHP API Client (v1) that this uses:
Documentation on the append
Google Sheets API:
All versions of google-sheets-php with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.4||^8.1
ext-json Version *
google/apiclient Version ^v1.1.9
google/apiclient-services Version ^0.176
ext-json Version *
google/apiclient Version ^v1.1.9
google/apiclient-services Version ^0.176
The package silinternational/google-sheets-php contains the following files
Loading the files please wait ....