Google Sheets – Extracting Data from Investing.com

google sheetsimporthtml

I am using google sheet function to extract a table from investing.com, the data I need is on daily basis, where there is a button in the page named "daily". However since the default setting of the page is "hourly", when I use "importhtml" in google sheet the data given is on an hourly basis. The url for both "daily" and "hourly" is exactly the same. How can I extract the "daily" data?

enter image description here

https://www.investing.com/equities/apple-computer-inc-technical

Best Answer

Actually this is an interesting workaround that works - for whatever reason - the mobile version of their site defaults to daily instead of hourly - the table indices are slightly differently ordered.

Original Function

But for example for this table, which on the regular page (the one you listed) would be :

=IMPORTHTML("https://www.investing.com/equities/apple-computer-inc-technical","table",5)

enter image description here

New Function

And for the same table with the mobile site you get daily:

=IMPORTHTML("https://m.investing.com/equities/apple-computer-inc-technical","table",0)

enter image description here