htmlxmlxpathexcel-2013excel-web-query

Excel 2013: Writing web query file to extract different values from website drop-down list


I am a complete beginner with coding so for the moment I am just trying to import data from websites into Excel 2013 using .iqy files to change the parameters of the queries and to try to understand the basics of the html language. I came across a question that was answered on stack overflow which was;

Q

I am trying to retrieve data from 
http://www.professorpaddle.com/rivers/riverlist.asp which automatically 
defaults to Washington state as the state id. However, I want to pull data 
from the table for Oregon. Can this be done as a property? So far I've tried 
writing a .iqy file and it still doesn't work.

A

WEB
1
http://www.professorpaddle.com/rivers/riverlist.asp
hstateid=37

Selection=EntirePage
Formatting=All
PreFormattedTextToColumns=True
ConsecutiveDelimitersAsOne=True
SingleBlockTextImport=False

My question is very similar. I am trying to import data into Excel 2013 from https://www.livecoinwatch.com. Specifically I want the site's live prices of (BTC, XRP, and IOTA) to be imported into Excel. The problem is that the website's default base currency is USD so when I import the data it is displayed in USD. Is it possible to extract data from the site's drop down menu to change the base currency to GBP and then import the data to Excel and have it displayed in GBP? I have been trying to write an .iqy file which looks like this;

WEB
1
https://www.livecoinwatch.com?menu=["14"]

Selection=EntirePage
Formatting=All
PreFormattedTextToColumns=True
ConsecutiveDelimitersAsOne=True
SingleBlockTextImport=False

Obviously I'm making a mistake here but am I even close? I know I can just link the USD data to another website's exchange rate to calculate the GBP rate but I want to understand which bit of html code to look for and how to write the correct .iqy file.

Any help on this would be most appreciated.

Cheers,

Dan


Solution

  • The website loads the website properly ,what you have to understand is how the conversion is being done.

    There may not be a direct way to fetching this data , when you change the currency the website actually gets the conversion rates by calling the URL

    https://www.livecoinwatch.com/api/convertFiat/USD/USD/GBP

    What you could have tried is change the last item from GBP to XRP and received the information for it directly , but seemingly their website does not support it.

    So what you will have to do is fetch the first information , get information from the https://www.livecoinwatch.com/api/convertFiat/USD/USD/GBP and then apply it to your USD rates directly and it should be done

    the data is available in json so you will have to fetch it like this in the advance editor

    Source = Json.Document(File.Contents("https://www.livecoinwatch.com/api/convertFiat/USD/USD/GBP"))

    Making it a multi step process to work on