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.

Page 6 of 14

Fetch data

googlespreadsheetimg6.jpg

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.

| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Page 6
ITWorld DealPost: The best in tech deals and discounts.
Shop Tech Products at Amazon