Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

Google Spreadsheet Data

A node.js script to import data from Google Drive. Useful to use Google Spreadsheet data in static websites.

This script is based on the tutorial of Sprint Works, but was rewrited in simple and basic Vanilla JS.

This script connects to your spreadsheet, gets data and saves them in a yaml file to use with Jekyll.

Of course, you can edit the script to save the data in another format (json, xml...).

How to use it

Google Cloud Platform

  1. Go to Google Cloud Platform: https://console.developers.google.com/iam-admin
  2. Enable the Google Drive API in API and Services > Library > Google Drive.
  3. Create credentials (service account key in json type). You may have to create a service account or you could use one you've already created.
  4. Download the json file and place it in your project
  5. Open the file to discover email address of the service account:
    {
        ...
        "client_email": "XXXXX@atomic-climate-XXXXXX.iam.gserviceaccount.com",
        ...
    }

Google Spreadsheet

  • Share the spreadsheet you want to use with your IAM user email address

Node JS

  1. Move the package.json and google-spreadsheet-data.js files in your project
  2. Install dependencies:
    $ npm install
  3. Setup the google-spreadsheet-data.js script:

About

Get data from a Google Spreadsheet using node.js

Topics

Resources

License

Releases

No releases published

Packages

No packages published