Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Track KLSE in Google Sheets, Use importxml

views
     
TShonsiong
post Nov 5 2020, 03:14 PM, updated 6y ago

Look at all my stars!!
*******
Senior Member
3,182 posts

Joined: Nov 2008
From: KL
For Bursa Malaysia (KLSE) and Singapore Exchange (SGX), we can scrape from i3investor websites. This is how.

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

 

Change to:
| Lo-Fi Version
0.0142sec    0.44    5 queries    GZIP Disabled
Time is now: 14th December 2025 - 03:54 PM