Forum Discussion
John99
May 15, 2020Copper Contributor
Getting data from web
I am trying to import some historical data for currency exchange rates on yahoo finance using the 'From Web' function in excel. The problem is that on yahoo finance, you have to scroll to the bottom ...
SergeiBaklan
May 16, 2020Diamond Contributor
I'm not familiar with Yahoo Finance, but what I see historical exchange rate is set by parameters and these parameters are in URL as
https://finance.yahoo.com/quote/EURUSD%3DX/history?period1=1526428800&period2=1589587200&interval=1d&filter=history&frequency=1d
For the start/end dates Yahoo uses UNIX timestamp format. Excel date, e.g. today, could be converted to it as
UnixTime = (TODAY() - DATE(1970,1,1))*86400
Thus you may set start/end dates in the Excel sheet, query them and use as parameters for the web query.
If data on web site doesn't depend on URL parameters there is no direct way to query such data. Workaround exists but not easy one.