Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Google App Script To Fetch Data From JSON Webservice and Write them to google spreadsheet.
function pullJSON() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheets = ss.getSheets();
var sheet = ss.getActiveSheet();
var url=""; // Paste your JSON URL here
var response = UrlFetchApp.fetch(url); // get feed
var dataAll = JSON.parse(response.getContentText()); //
var dataSet = dataAll;
var rows = [],
for (i = 0; i < dataSet.length; i++) {
data = dataSet[i];
rows.push([,,]); //your JSON entities here
dataRange = sheet.getRange(1, 1, rows.length, 3); // 3 Denotes total number of entites
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.