Rainbow1112
Supremacy Member
- Joined
- May 6, 2008
- Messages
- 5,338
- Reaction score
- 104
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.