How to create an automatically updating Google spreadsheet

Tired of finding, copying and pasting data into spreadsheets? With just a few lines of code, you can set up a self-updating spreadsheet in Google Docs that fetches and stores data for you, as this Facebook example shows.

By Sharon Machlis, Computeworld |  IT Management, Google, google docs

Fetch data

What we're looking for is the number of likes in this returned JSON data that will look something like the data at left.

Google's developer documentation shows that fetching data uses

UrlFetchApp.fetch(url);

so we'll create a variable holding that

var result = UrlFetchApp.fetch(url);

and then parse the JSON result.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

IT ManagementWhite Papers & Webcasts

See more White Papers | Webcasts

Answers - Powered by ITworld

ITworld Answers helps you solve problems and share expertise. Ask a question or take a crack at answering the new questions below.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Ask a Question