facebookIs there an alternative method to update 3067.HK's price (iShares Hang Seng TECH ETF) in Google Sheet, other than GOOGLEFINANCE()? - Seedly

Advertisement

Sean Ng

14 Jan 2022

βˆ™

Stocks

Is there an alternative method to update 3067.HK's price (iShares Hang Seng TECH ETF) in Google Sheet, other than GOOGLEFINANCE()?

I have been using GOOGLEFINANCE() to capture the current price of 3067.HK's price (iShares Hang Seng TECH ETF) in my own portfolio's Google Sheet. Recently I discovered that 3067.HK is no longer to be found in GOOGLE FINANCE. Is there any other method to update the price in Google Sheet?

Discussion (2)

What are your thoughts?

Learn how to style your text

You can pull the price data in from Yahoo Finance. That can be done quite easily using Google Apps Script. In the Apps script, you can define a function to retrieve data from any web page and then parse the HTML output.

​

I explained about how to do this in-depth in an article on Medium.

You can use web scraping functions instead, reading a webpage with a price for the fund. Here is what I use:

=IMPORTXML("https://www.cnbc.com/quotes/3067-HK", "//*@id='MainContentContainer'/div/div2/div1/div2/div3/div1/div2/span1")

​

The second parameter is XPath. If you use a different page, you can easily retrieve XPath using 'Inspect Element' in Safari (need to enable Developer mode first).

Write your thoughts

Advertisement