Senin, 17 September 2018

[smf_addin] Digest Number 4400

3 Messages

Digest #4400

Messages

Sun Sep 16, 2018 11:51 am (PDT) . Posted by:

mff2805

Hi Randy,
I'm trying to capture the description of the company from BarChart.


I can use this formule to pull the info into a cell
=smfGetTagContent("https://www.barchart.com/stocks/quotes/ISRG/profile","p",1,">Description:",,,,1)



but when i put this formula into a table column top row for an udpateDownloadTable funtion the results are #Value!
smfGetTagContent("https://www.barchart.com/stocks/quotes/~~~~~/profile","p",1,">Description:",,,,1)


any ideas on why the text info is not coming through? Any alternatives to getting such info?


thanks much.
Mike


Sun Sep 16, 2018 1:44 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

The smfUpdateDownloadTable process uses VBA's EVALUATE() function.
Unfortunately, that function errors out if the returned string is over 255
bytes long. So, you could do this to return just the left 255 bytes:

LEFT(smfGetTagContent("https://www.barchart.com/stocks/quotes/~~~~~/profile
","p",1,">Description:",,,,1),255)

Or, you could grab the description 255 bytes at a time:

MID(smfGetTagContent("https://www.barchart.com/stocks/quotes/~~~~~/profile
","p",1,">Description:",,,,1),1,255)
MID(smfGetTagContent("https://www.barchart.com/stocks/quotes/~~~~~/profile
","p",1,">Description:",,,,1),256,255)
MID(smfGetTagContent("https://www.barchart.com/stocks/quotes/~~~~~/profile
","p",1,">Description:",,,,1),511,255)

My version of the add-in does have something you'll be able to use in the
future to get it all in one shot:

="==smfGetTagContent(""https://www.barchart.com/stocks/quotes/~~~~~/profile
"",""p"",1,"">Description:"",,,,1)"

The "==" prefix on the string will tell smfUpdateDownloadTable to bypass
the EVALUATE() function. Instead, it will place the finalized formula, with
a single "=" instead of the double "==", into the cell and then calculate
the result of the formula, leaving a value. So that formula does actually
work for me right now, returning a 533-byte description.

On Sun, Sep 16, 2018 at 12:23 PM mff3429@comcast.net [smf_addin] <
smf_addin@yahoogroups.com> wrote:

> I'm trying to capture the description of the company from BarChart.
>
> I can use this formule to pull the info into a cell
>
> =smfGetTagContent("https://www.barchart.com/stocks/quotes/ISRG/profile
> ","p",1,">Description:",,,,1)
>
> but when i put this formula into a table column top row for an
> udpateDownloadTable funtion the results are #Value!
>
> smfGetTagContent("https://www.barchart.com/stocks/quotes/~~~~~
> /profile","p",1,">Description:",,,,1)
>
> any ideas on why the text info is not coming through? Any alternatives to
> getting such info?
>
>
>

Sun Sep 16, 2018 8:06 pm (PDT) . Posted by:

tonyestep

Is there some function in SMF that can fetch historical earnings data? All I need is annual earnings for any large-cap growth and value ETF. Examples would be IVW, IVE, IWF, IWD, VONV, VONG, or anything else similar. S&P used to publish this and other data but discontinued it. I have tried all the sources I can think of, but have come up empty. Can anybody point me to a way to get this info?
Thanks,
Tony Estep
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Posting Komentar