Download the PHP package donhq/php-google-spreadsheet-client without Composer

On this page you can find all versions of the php package donhq/php-google-spreadsheet-client. 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 php-google-spreadsheet-client

Build Status

Introduction

This library provides a simple interface to the Google Spreadsheet API.

There are a couple of important things to note.

I strongly recommend you read through the official Google Spreadsheet API documentation to get a grasp of the concepts.

Usage

Installation

Using composer is the recommended way to install it.

1 - Add "asimlqt/php-google-spreadsheet-client" as a dependency in your project's composer.json file.

2 - Download and install Composer.

3 - Install your dependencies.

4 - Require Composer's autoloader.

Bootstrapping

The first thing you will need to do is initialize the service request factory:

Retrieving a list of spreadsheets

SpreadsheetFeed implements ArrayIterator so you can iterate over it using a foreach loop or you can retrieve a single spreadsheet by name.

Retrieving a list of worksheets

You can retrieve a list of worksheets from a spreadsheet by calling the getWorksheets() method.

You can loop over each worksheet or get a single worksheet by title.

Adding a worksheet

The only required parameter is the worksheet name, The row and column count are optional. The default value for rows is 100 and columns is 10.

Deleting a worksheet

Working with list-based feeds

Retrieving a list-based feed

Once you have a list feed you can loop over each entry.

The getValues() method returns an associative array where the keys are the column names and the values are the cell content.

Note: The Google api converts the column headers to lower case so the column headings might not appear to be the same as what you see in Google Drive using your browser.

Note: If there is data for a particular row which does not have a column header then Google randomly generates a header and as far as i know it always begins with an underscore. Bear in mind that this is not generated by this library.

You can also sort and filter the data so you only retrieve what is required, this is expecially useful for large worksheets.

To find out all the available options visit https://developers.google.com/google-apps/spreadsheets/#sorting_rows.

Adding a list row

When adding or updating a row the column headers need to match exactly what was returned by the Google API, not what you see in Google Drive.

Updating a list row

Adding headers to a new worksheet

The Google Spreadsheet API does not allow you to update a list row if headers are not already assigned. So, when you create a new worksheet, before you can add data to a worksheet using the 'Adding/Updating a list row' methods above, you need to add headers.

To add headers to a worksheet, use the following:

Updating multiple cells with a batch request

When attempting to insert data into multiple cells then consider using the batch request functionality to improve performance.


All versions of php-google-spreadsheet-client with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
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 donhq/php-google-spreadsheet-client contains the following files

Loading the files please wait ....