View Single Post
Old 10-11-2017, 02:24 PM   #41
Rainbow1112
Supremacy Member
 
Rainbow1112's Avatar
 
Join Date: May 2008
Posts: 5,355
Hi all,

I have 2 alternatives if you are using Investment Moat's google spreadsheet.

Simply copy and paste the following into the respective cells:

For Bloomberg Prices:

=IMPORTXML("http://www.bloomberg.com/quote/"&F3&":SP","//div[@class='price']")

Replace the cell F3 with Bloombergs code for the SGX listed company. For instance, if you look up Keppel Corp, Bloomberg's code for keppel is KEP, so key in KEP in the cell F3.

For wall street journal prices:

=IMPORTXML("http://quotes.wsj.com/SG/"&F3&"","//span[@class='cr_num cr_curr_price']/span[@id='quote_val']")

WSJ is easier, because you just need to put in the SGX ticker in F3. For instance, the ticker for Kep Corp is BN4, so key in BN4 in the cell F3.

For some reason, quotes for the ETF G3B is not available on WSJ, so I had to use Bloomberg's prices for that. I only tested the above on google spreadsheets, not excel. I have no idea how to do it for excel.
cant seem to get this to work..

formula entered in cell G2

=IMPORTXML("http://www.bloomberg.com/quote/"&F2&":SP","//div[@class='price']")

Cell F2 i enter Bloomberg code for M1 - M1:SP

i'm getting Error Imported content is empty.
Rainbow1112 is online now   Reply With Quote