V
V
Vlad Chiehov2017-11-04 16:39:04
HTML
Vlad Chiehov, 2017-11-04 16:39:04

How to pull a number from a web page into a Google Docs spreadsheet?

Greetings!
The question is a bit tricky.
I keep statistics on the rise and fall of cryptocurrencies. I take the numbers from a certain site. I decided to optimize it all so as not to do it manually every time.
So, in the Google Docs cell, you need to enter the price value of the cryptocurrency, which is located, for example, here:
https://coinmarketcap.com/currencies/aragon/
At the moment, the price of this currency is: $1.21
This very number must be transferred to the table, but with the following condition:
1) Remove the "$" sign
2) Replace the dot with a comma, since Google Docs does not accept a number with a dot.
Additionally:
3) It is necessary that this number be pulled out only once. That is, if I keep statistics today, then when I open the document tomorrow, apparently, the value in yesterday's line will automatically change to today's.
4) Perhaps, in addition to everything, it is possible that the number is pulled out not just once, but also at a given time. For example, at 13.00 of each new day, the formula should enter the number taken from the site once and do not touch it anymore.
It seems to me that the task is a little fantastic, but if it is possible, it would be very cool)
Thank you all for the answers!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Taratin, 2017-11-04
@Taraflex

For getting data https://developers.google.com/apps-script/referenc...
Parsing html https://sites.google.com/site/scriptsexamples/lear...
Regarding cron

We create a google spreadsheet. We save. Select Tools -> Script Editor from the menu.
In the editor File -> Create -> Script -> cron.gs
To content
function cron1() {
try {
UrlFetchApp.fetch('');
} catch (e) {}
}
Save
Edit -> Current project's triggers -> Add trigger -> Select cron1 function name
and trigger interval
Once again, save everything just in case.
If you do not go into details of what and why, then something like this.

Changing a cell in a table https://stackoverflow.com/questions/11334296/googl...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question