Code Monkey home page Code Monkey logo

google-spreadsheets-parser's Introduction

build status

google-spreadsheets-parser

Simple Google Spreadsheets parser for JavaScript

Installation

NPM

npm install google-spreadsheets-parser

Manual Download

Download from here

Introduction

  1. Create new Google Spreadsheet

intro-1

  1. Publish spreadsheet

intro-2

You can show following tables from published url

intro-3

  1. Setting

With Browser, import googleSpreadsheetsParser.js in header

<script type="text/javascript" src="/path/to/googleSpreadsheetsParser.js"></script>

Node.js

var GoogleSpreadsheetsParser = require('google-spreadsheets-parser')
  1. Get data
var gss = new GoogleSpreadsheetsParser(publishedUrl, {sheetTitle: 'Sample', hasTitle: true});

console.log(gss.titles);          // ["ID", "Name", "Age"]
console.log(gss.contents);        // [Array[3], Array[3], Array[3], Array[3], Array[3]]
console.log(gss.contents[2][1]);  // Doug

Features

  • .titles : Table titles array in the frst row.
  • .contents : Table data 2d array in the second row later.
  • .toJson() : JSON data of contents.

Demo

google-spreadsheets-parser's People

Contributors

tanakaworld avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

google-spreadsheets-parser's Issues

Sometimes blanks are wanted

I'm using this to grab data from a google sheet and I want to validate in my application (even if it is blank) and right now it doesn't allow you to pull in data that is blank.

Error getting data from google sheets

Hi,
All my dev using this great library is now getting 404 errors on data loading. Sheets are still existing. Google docs API changes ?
Anyone with the same issue ?
image
Best regards,
Pierre-Yves

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.