Upgrade button / GOOGLE SPREADSHEET auto-update

I hope you help me. I have been trying to get this to work for some time.

I am taking the API from a website importing it into google spreadsheets. VIA importjson ()

ImportJSON (" http://api.796.com/v3/futures/ticker.html?type=weekly ")

https://gist.github.com/chrislkeller/5719258

I have no problem importing json data into google spreadsheet, now the hard part is updating the data, I would really like the automatic update, but even the “update now” button would be great.

Thanks, It drove me crazy. Bv

+3
source share
4 answers

, . .

importJSON :

function ImportJSON(url, query, parseOptions, recalc) {
}

recalc . "", , GSheet , - . importJSON ( GSheet) :

=ImportJSON("https://yourDomain.com/something","","rawHeaders",A1)

A1 - , . .

... ... A1 1, 2, 3. , recalc. UNDO REDO .

Kludge, "recalc" .

+1

> > > :

a = now(), .

, , , , , .

0

I'm not very human, but I may have a little code that can help you get started. (Sorry if this does not help). What I use on my site is this (I changed it a bit to include your url).

$( document ).ready(function($) {
  setInterval(function(){
    $('.sell').load('http://api.796.com/v3/futures/ticker.html?type=weekly');
  }, 5000);
});

It just captures JSON every 5 seconds, so be sure to parse the JSON and display the data you need. Hope this helps! :)

-2
source

All Articles