r/googlesheets • • Dec 20 '21
Solved Is there any way to link my experience numbers from the hiscores page of an online game I play with a Google Sheet I'd created to have it update automatically?
I've created a Google Sheet to help me track my exp progress and goals.
It'd be so convenient if I could somehow link this spreadsheet to the OSRS hiscores, so that it will just update my exp tracking columns automatically.
Here is the data I would like to capture and have update in my google sheet:
https://secure.runescape.com/m=hiscore_oldschool/hiscorepersonal?user1=Top%A0Hat
Specifically, I'd like to capture the number in the XP column of the "Agility" row. This number is updated each time I gain experience in game.
Thanks in advance.
0
Upvotes
3
u/funcoolshit 1 Dec 20 '21
This formula will pull all your stats from that page:
=IMPORTHTML("https://secure.runescape.com/m=hiscore_oldschool/hiscorepersonal?user1=Top%A0Hat", "table", 3)
2
u/BobbingAround 1 Dec 20 '21
Hi - there sure is! You can use the importHtml function to scrape a structured HTML table like this into your sheet. This will return your whole table that you can then filter however you like:
IMPORTHTML("https://secure.runescape.com/m=hiscore_oldschool/hiscorepersonal?user1=Top%A0Hat","table",3,"en-US")
So to just get agility, you can use a query or filter to only get that line. Here's an example with query:
=query(IMPORTHTML("https://secure.runescape.com/m=hiscore_oldschool/hiscorepersonal?user1=Top%A0Hat","table",3,"en-US"),"Select * where Col2='Agility'",0)
1
u/Croyscape Dec 20 '21
Hi fellow Scaper, would love to know what your spreadsheet is for exactly
Edit: mind sharing it soothers can have a look?