Minggu, 20 Januari 2019

[smf_addin] Digest Number 4464

6 Messages

Digest #4464

Messages

Sat Jan 19, 2019 7:05 am (PST) . Posted by:

"Randy Harmelink" rharmelink

RCHGetTableCell() doesn't work because the data isn't presented within an
HTML table. Instead, try:

=smfGetTagContent("https://www.investing.com/equities/tencent-holdings-hk","span",1,">Market
Cap",,,,1)

On Sat, Jan 19, 2019 at 1:44 AM alankc_mok@... wrote:

>
> If I want to get the Market Cap and P/E Ratio from investing.com
> https://www.investing.com/equities/tencent-holdings-hk should I use
> RCHGetTableCell ?
>
> I have used =RCHGetTableCell("
> https://www.investing.com/equities/tencent-holdings-hk",1,">Market Cap")
> but fail.
>
>
>

Sat Jan 19, 2019 2:23 pm (PST) . Posted by:

alankc_mok

Randy,

Thanks. I can now get Market Cap. I can extend this macro to get Prev. Close, but I can't get Open . So what should be the things I need to look into so as to get the remaining contents such as EPS, Beta ?


Regards


Alan

Sat Jan 19, 2019 11:10 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

The same patterns works fine for me:

=smfGetTagContent("https://www.investing.com/equities/tencent-holdings-hk
","span",1,">Open",,,,1)
=smfGetTagContent("https://www.investing.com/equities/tencent-holdings-hk
","span",1,">EPS",,,,1)
=smfGetTagContent("https://www.investing.com/equities/tencent-holdings-hk
","span",1,">Beta",,,,1)

On Sat, Jan 19, 2019 at 3:23 PM alankc_mok@... wrote:

>
> Thanks. I can now get Market Cap. I can extend this macro to get Prev.
> Close, but I can't get Open . So what should be the things I need to look
> into so as to get the remaining contents such as EPS, Beta ?
>
>
>

Sun Jan 20, 2019 1:52 am (PST) . Posted by:

alankc_mok

Randy,

Thanks for your reply.


Actually, my problem is when I used the same template and applied to another symbol, I can't get the Open Price


=smfGetTagContent("https://www.investing.com/equities/cheung-kong","span",1,">Open",,,,1)


May be my general question is how to decide which addin to be used ? Or it is more or less a trial and error method to start with ?


Regards


Alan

Sun Jan 20, 2019 2:10 am (PST) . Posted by:

"Randy Harmelink" rharmelink

You pretty much need to look at the source code of the web page for the
specifics of how to extract data. The problem with your formula was you
didn't specify a unique search string. Try:

=smfGetTagContent("https://www.investing.com/equities/cheung-kong
","span",1,">Open:",,,,1)

The problem with using just ">Open" is that it finds the string ">Opening
Bell" earlier on the web page.

On Sun, Jan 20, 2019 at 2:52 AM alankc_mok@... wrote:

>
> Actually, my problem is when I used the same template and applied to
> another symbol, I can't get the Open Price
>
> =smfGetTagContent("https://www.investing.com/equities/cheung-kong
> ","span",1,">Open",,,,1)
>
> May be my general question is how to decide which addin to be used ? Or it
> is more or less a trial and error method to start with ?
>
>
>

Sun Jan 20, 2019 3:38 am (PST) . Posted by:

alankc_mok

Randy,

After using your code, I can get the Open Price. Thanks.

As to Stock quote and Stock Option Quote, may I ask what are the site that have more accessible data while I don't mind to pay for a nominal subscription fee ? Will it be Barchart ?

Regards

Alan
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Posting Komentar