Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

cba85/google-spreadsheet-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published