Sabtu, 24 Mei 2014

[smf_addin] Digest Number 3073

8 Messages

Digest #3073
1a
1b
Re: Add-in & formatting by "Randy Harmelink" rharmelink
2b
Re: Weekly option prices by "Randy Harmelink" rharmelink
3a
smfGetTagContent() or smfstrExtr(RCHGetWebData())? by "andrei radulescu-banu" iubica2
3c

Messages

Fri May 23, 2014 7:57 am (PDT) . Posted by:

ssztaba

Dear Randy,

I did the update to the current smf add-in this morning, and the problem of getting weekly options data has disappeared -- Thank you.

A couple of other issues have popped up -- relating to formatting:

My 'old' smf version was 2.1.2012.12.29
The 'new' smf version is 2.1.2014.01.30

I noticed that in using the RCHGetYahooQuotes array that now any unused cells in the array are filled with XXXXXX in the Name column and 0.00 in the last price column. In the 'old' version any unused cells were simple left blank and not filled with Xs and zeros.

I like to have my worksheets clean, without filler data, or error or other info. Is there any way, perhaps with parameters in the array, to control whether the empty cells are filled or not ?? I much prefer the 'old' non-filled cells.


Also, I notice something strange regarding formatting when using the RCHGetElementNumber formula:


This morning I ran the 'old' smf addin on my laptop, as well as the 'new' version on my desktop and saw the following:



With the 'old' version =RCHGetElementNumber(ANF,1285) -- for the next Earnings data returned May 29, 2014.


With the 'new' version the same =RCHGetElementNumber(ANF,1285) formula returned 29-May-14


The data in the cell does not seem able to be formatted in a way other than the way it's returned, as though the formatting was being determined by the add-in rather than by the formatting of the cell into which the response is placed.


Any guidance on how this formatting might be controllable by me ??


Thanks


Stan Sztaba






Fri May 23, 2014 8:21 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

On Fri, May 23, 2014 at 7:57 AM, ssjurik@optonline.net [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> I did the update to the current smf add-in this morning, and the problem
> of getting weekly options data has disappeared -- Thank you.
>
> A couple of other issues have popped up -- relating to formatting:
>
> My 'old' smf version was 2.1.2012.12.29
> The 'new' smf version is 2.1.2014.01.30
>
> I noticed that in using the RCHGetYahooQuotes array that now any
> unused cells in the array are filled with XXXXXX in the Name column and
> 0.00 in the last price column. In the 'old' version any unused cells were
> simple left blank and not filled with Xs and zeros.
>
> I like to have my worksheets clean, without filler data, or error or other
> info. Is there any way, perhaps with parameters in the array, to control
> whether the empty cells are filled or not ?? I much prefer the 'old'
> non-filled cells.
>
That was a requested change.

The issue was that when someone left an empty row in between groups of
ticker symbols, the line would be dropped. That would cause all returned
data after that point to be offset by a row. So the "XXXXXX" symbol was
used as a placeholder, since Yahoo does return data for it.

Let me look at that again. It may be easy to "back out" the "XXXXXX"
symbols on the back end, leaving a blank row.

> Also, I notice something strange regarding formatting when using the
> RCHGetElementNumber formula:
>
> This morning I ran the 'old' smf addin on my laptop, as well as the 'new'
> version on my desktop and saw the following:
>
> With the 'old' version =RCHGetElementNumber(ANF,1285) -- for the next
> Earnings data returned May 29, 2014.
>
> With the 'new' version the same =RCHGetElementNumber(ANF,1285) formula
> returned 29-May-14
>
That's because it's picked up from a different web page on Yahoo, and they
have different formats. The old location wasn't reliable, which is why I
changed the location.

> The data in the cell does not seem able to be formatted in a way other
> than the way it's returned, as though the formatting was being determined
> by the add-in rather than by the formatting of the cell into which the
> response is placed.
>
> Any guidance on how this formatting might be controllable by me ??
>
That's because it's a text string, not a serial date. You can use the
DATEVALUE() function to turn it into a serial date. Then you can apply date
formats to it.

Fri May 23, 2014 9:15 am (PDT) . Posted by:

trendsekr

This method seems to have stopped working for weeklies, just displays ERROR.

=smfGetOptionQuotes("ibm 5/30 2014 $185 Call", "l")

Fri May 23, 2014 9:16 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

Hmmm. Working fine here. Did you try the smfForceRecalculation to get a new
copy of the web page? Maybe there was a glitch in getting the Yahoo web
page.

On Fri, May 23, 2014 at 9:09 AM, trendsekr@yahoo.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> This method seems to have stopped working for weeklies, just displays
> ERROR.
>
> =smfGetOptionQuotes("ibm 5/30 2014 $185 Call", "l")
>

Fri May 23, 2014 6:12 pm (PDT) . Posted by:

"andrei radulescu-banu" iubica2

Hi Randy,

I was looking for ways to parse the NAV output in
http://quotes.morningstar.com/fund/c-header?&t=SPY, and realized there is a
smfGetTagContent() function available in the code, although not listed in
http://ogres-crypt.com/SMF/Documentation.

For example, this retrieves what I need:

=smfGetTagContent("http://quotes.morningstar.com/fund/c-header?&t=SPY", "",
0, "<span vkey=""NAV"">")

There is another way to get the same, combining RCHGetWebData() and
smfstrExtr().

=TRIM(smfstrExtr(RCHGetWebData("
http://quotes.morningstar.com/fund/c-header?&t=SPY", "<span vkey=""NAV"">",
100), "<span vkey=""NAV"">", "</span&quot;))

Which is the better of the two? Is the smfGetTagContent() interface going
to be maintained "as is" going forward?

Thanks,
Andrei

--
==================================
Andrei Radulescu-Banu
86 Cedar St, Lexington MA
617.216.8509 (m), 781.862.5854 (h)
lex-wiki.org, lex4lang.org,
andrei4schools.com, bitdribble.com
==================================

Fri May 23, 2014 7:33 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

The documentation is there:

http://ogres-crypt.com/SMF/Documentation/viewer.php?name=smfGetTagContent-Function.html

The way I've been doing those is very similar to your first one:

=smfConvertData(smfGetTagContent("
http://quotes.morningstar.com/fund/c-header?&t=SPY", "span", 0,
"vkey=""NAV"">"))

Side note -- in my version of the add-in, I'd just do:

=smfGetTagContent("http://quotes.morningstar.com/fund/c-header?&t=SPY",
"span", 0, "vkey=""NAV"">",,,,1)

...since I've now implemented the "pConv" variable:

*Date* *Routine* *Description* 2014-04-07 smfStripHTML New utility function
to remove HTML tags from text 2014-04-10 smfGetTagContent Added ability to
strip HTML and attempt conversion to a number if "pConv" parameter is set
to 1
On Fri, May 23, 2014 at 6:12 PM, andrei radulescu-banu
bitdribble@gmail.com wrote:

>
> I was looking for ways to parse the NAV output in
> http://quotes.morningstar.com/fund/c-header?&t=SPY, and realized there is
> a smfGetTagContent() function available in the code, although not listed in
> http://ogres-crypt.com/SMF/Documentation.
>
> For example, this retrieves what I need:
>
> =smfGetTagContent("http://quotes.morningstar.com/fund/c-header?&t=SPY",
> "", 0, "<span vkey=""NAV"">")
>
> There is another way to get the same, combining RCHGetWebData() and
> smfstrExtr().
>
> =TRIM(smfstrExtr(RCHGetWebData("
> http://quotes.morningstar.com/fund/c-header?&t=SPY", "<span
> vkey=""NAV"">", 100), "<span vkey=""NAV"">", "</span&quot;))
>
> Which is the better of the two? Is the smfGetTagContent() interface going
> to be maintained "as is" going forward?
>
>

Fri May 23, 2014 8:18 pm (PDT) . Posted by:

"andrei radulescu-banu" iubica2

Very nice. Thanks!

Somehow, the link to
http://ogres-crypt.com/SMF/Documentation/viewer.php?name=smfGetTagContent-Function.htmlis
missing on
http://ogres-crypt.com/SMF/Documentation.

Since I'm still new at this, I eventually figured there is a difference
between NAV and Latest Price, and it was the 2nd I was meaning to use. It
is available at http://quotes.morningstar.com/stock/c-header?&t=SPY, and it
can be parsed in a very similar way.

Your work and help to this mailing group is invaluable, Randy!...
Andrei

Fri May 23, 2014 8:35 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

That's where I got it from. I just clicked the link and then copied the
URL??

It's 8th from the bottom on the alphabetical list.

On Fri, May 23, 2014 at 8:18 PM, andrei radulescu-banu
bitdribble@gmail.comwrote:

>
> Somehow, the link to
> http://ogres-crypt.com/SMF/Documentation/viewer.php?name=smfGetTagContent-Function.htmlis missing on
> http://ogres-crypt.com/SMF/Documentation.
>

Tidak ada komentar:

Posting Komentar