Quote (carteblanche @ Mar 22 2016 05:17pm)
Okay so I made a function using your code.
Code
function storeValue(){
// get the json data
var data = storeValue();
// A1 stores the row number of the last row we used. we will put data in the B column
var previousLocation = SpreadsheetApp.getActiveSheet().getRange('A1').getValue();
// increment it
var newLocation =previousLocation + 1;
SpreadsheetApp.getActiveSheet().getRange('A1').setValue(newLocation);
// store the data in the next row
SpreadsheetApp.getActiveSheet().getRange("B" + newLocation).setValue(data);
}
With this function I would make it so that the cell A1
Code
=storeValue('Prices'!C4)
While 'Prices'!C4
Code
=importJSON(url, query, parseOptions)
This returns the error "Exceeded maximum stack depth (line 3)."
I googled this and found that the problem is that the function calls itself repeatedly until it hits the limit.
Is this correct?
I believe I understand the code you wrote and how to read it, especially with the helpful comments, but I can't for the life of my figure out how to write it.
I looked through the stackoverflow page you posted as well and played around with the code a bit but can't seem to figure out how to do it.
This post was edited by Eliowns on Mar 23 2016 03:39am