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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
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...

  1. Go to the Google Developers Console.
  2. If you do not yet have a project that you plan to use this with, create one.
  3. Enable the "Google Sheets API" for that project.
  4. 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
  5. Save that JSON file to some private folder where your code can access it.
  6. 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 "/".
  7. 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)...

  1. Clone this repo to your local machine.
  2. 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).
  3. Copy the local.env.dist file to local.env, giving it the requested values.
  4. Open a terminal to the root of the repo and run make.
  5. 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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package silinternational/google-sheets-php contains the following files

Loading the files please wait ....