This is the formula for KLSE:
CODE
=index(ImportXML("https://klse.i3investor.com/servlets/stk/5099.jsp", "//td[contains(@class, 'big16')]"), 1, 1)
For CIMB PRS:
CODE
=index(ImportXML("https://www.principal.com.my/en/cc5", "//td[contains(@class, 'views-field views-field-field-fund-nav')]"), 2, 4)
For gold prices:
First, install ImportJSON functions from https://github.com/bradjasper/ImportJSON into your Google Sheets script editor.
Then, you can use this formula to fetch USD per oz:
CODE
=index(ImportJSON("https://data-asg.goldprice.org/dbXRates/USD", "/items"), 2, 2)
Source
Nov 5 2020, 03:14 PM, updated 6y ago
Quote
0.0136sec
0.58
5 queries
GZIP Disabled