Giter Club home page Giter Club logo

jquery-google-spreadsheet's Introduction

jQuery GoogleSpreadsheet

jQuery plugin to read data from google spreadsheets easy. This plugin uses Google Spreadsheets API version 3.0. Link. Created by quelicm based google-spreadsheet-javascript

ChangeLog

v 0.0.2

  • Code optimized thanks to the advice of @joseanpg

v 0.0.1

  • Initial version

Requirements:

To run your spreadsheet in google must be published to the web. To do this go to File -> Publish to the web in the next screen select:

  • in Sheets to publish you can publish all or just a specific sheet and press the button Start publishing
  • in Get a link to the published data web page you must select the first selector, this will generate a url in the textarea below, this is the url that we use. Example

Installation:

Add the meta script to your web page

<script src="js/jquery.google.spreadsheet.min.js"></script>

Use

In your code introduces the following lines

var url = "https://docs.google.com/spreadsheet/pub?key=0AtIDg8Wg2JCFdGdibXdnaWd2eVRRR2xVM0RlMU55ekE&output=html";
var googleSpreadsheet = new GoogleSpreadsheet();
googleSpreadsheet.url(url);
googleSpreadsheet.load(function(result) {
	//result 
});
  • var url Indicate the url's where our spreadsheet
  • var googleSpreadsheet instance of the class
  • googleSpreadsheet.url(url); add to our class to process the url
  • googleSpreadsheet.load call the function that returns all data spreadsheet our json format.
  • result as json object contains all the data from the spreadsheet that we have introduced.

Support for multiple sheets

If your spreadsheet has more than one page, you can access the contents of the following adding to the url parameter &gid=num be 0 for first, 1 for the second ... Example

jquery-google-spreadsheet's People

Contributors

quelicm avatar miteshsavani avatar

Watchers

 avatar

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.