https://github.com/tanakaworld/google-spreadsheets-parser
Simple Google Spreadsheets parser for JavaScript
https://github.com/tanakaworld/google-spreadsheets-parser
google-spreadsheet google-spreadsheets-parser javascript
Last synced: 2 months ago
JSON representation
Simple Google Spreadsheets parser for JavaScript
- Host: GitHub
- URL: https://github.com/tanakaworld/google-spreadsheets-parser
- Owner: tanakaworld
- License: mit
- Created: 2015-11-18T13:25:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-14T09:31:59.000Z (about 9 years ago)
- Last Synced: 2025-03-17T13:08:57.278Z (3 months ago)
- Topics: google-spreadsheet, google-spreadsheets-parser, javascript
- Language: CoffeeScript
- Size: 32.2 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# google-spreadsheets-parser
Simple Google Spreadsheets parser for JavaScript## Installation
#### NPM
```
npm install google-spreadsheets-parser
```#### Manual Download
Download from [here](https://github.com/TanakaYutaro/google-spreadsheets-parser/releases)## Introduction
1. Create new Google Spreadsheet

2. Publish spreadsheet

You can show following tables from [published url](https://docs.google.com/spreadsheets/d/1vyPu1EtzU1DvGXfthjrR-blJ8mGe75TL4BFNWtFMm0I/pubhtml)

3. SettingWith Browser, import googleSpreadsheetsParser.js in header
```html
```Node.js
```
var GoogleSpreadsheetsParser = require('google-spreadsheets-parser')
```
4. Get data```javascript
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
- [With Browser](http://tanakaworld.github.io/google-spreadsheets-parser/demo/)
- [Parameterized test](https://github.com/tanakaworld/google-spreadsheets-parser/tree/master/demo/karma-jasmine-parameterized-test)