Skip to content

Reads data from a Google Spreadsheet that requires authentication

License

Notifications You must be signed in to change notification settings

juampynr/google-spreadsheet-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Spreadsheet Reader

This project contains a sample script that uses a service account to authenticate against Google Spreadsheets in order to read the content's of a spreadsheet.

Installation

Start by creating a service account at the Google Developer Console:

  1. Open https://console.developers.google.com/apis/library

Console homepage

  1. Enable it and create a project:

Enable sheets

  1. At Credentials, create a service account:

Create service account

  1. Keep defaults at the next form and click Create. Save the resulting private key file in a directory where your application can read it:

Fill out form

  1. Next, click on “Manage Service accounts”:

Manage service sccounts

  1. Copy the email address of your service account:

Copy service account email

  1. Grant permission to the service account to the spreadsheet:

Share with service account

  1. Read the contents of index.php and fill out the required variables. Then execute it with:
composer install
php index.php

You should see the raw contents of the spreadsheet.

About

Reads data from a Google Spreadsheet that requires authentication

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages