Selasa, 09 April 2019

[smf_addin] Digest Number 4514

4 Messages

Digest #4514

Messages

Mon Apr 8, 2019 11:53 am (PDT) . Posted by:

a.bereziuk

Hello,


how can I extract a bond price from this code:


Aktueller Kurs<!-- /react-text --></div><div class="meta"><span><i class="quality-icon DLY"></i><span><time datetime="1554738502000">08.04.2019, 17:48:22</time><!-- react-text: 135 --> Uhr<!-- /react-text --></span></span></div><div class="ui small horizontal statistic price positive"><div class="value positive"><i aria-hidden="true" class="arrow up icon"></i><span class=""><!-- react-text: 140 -->101,23<!-- /react-text --><!-- react-text: 141 --> <!-- /react-text --><!-- react-text: 142 --><!-- /react-text --></span></div><div class="label positive">%</div>


Source:

https://www.onvista.de/anleihen/XS1261825621 https://www.onvista.de/anleihen/XS1261825621


This is not a table, so getTableCell won't work, but getWebData needs constant offset, but here it seems to change every day.

Mon Apr 8, 2019 12:05 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Unfortunately, the extracted HTML code you provide below is not part of the
delivered source code for the web page. It is part of the rendered web
page. The add-in only has access to the delivered source code, as it
doesn't render the web page.

The value does appear to be within Javascript code, but I'm not sure which
value to pick up. This section looks like the most recent price:

timesAndSales:
[{"time":"1554738502","price":101.23,"performance":0.0014839730906213,"volume":0,"cumulatively":0},

If so, try:

=smfStrExtr(RCHGetWebData("https://www.onvista.de/anleihen/XS1261825621
","timesAndSales",200),"""price"":",",",1)

On Mon, Apr 8, 2019 at 11:53 AM a.bereziuk@... wrote:

>
> how can I extract a bond price from this code:
>
> Aktueller Kurs<!-- /react-text --></div><div class="meta"><span><i
> class="quality-icon DLY"></i><span><time
> datetime="1554738502000">08.04.2019, 17:48:22</time><!-- react-text: 135
> --> Uhr<!-- /react-text --></span></span></div><div class="ui small
> horizontal statistic price positive"><div class="value positive"><i
> aria-hidden="true" class="arrow up icon"></i><span class=""><!--
> react-text: 140 -->101,23<!-- /react-text --><!-- react-text: 141 -->
> <!-- /react-text --><!-- react-text: 142 --><!-- /react-text
> --></span></div><div class="label positive">%</div>
>
> Source:
> https://www.onvista.de/anleihen/XS1261825621
>
> This is not a table, so getTableCell won't work, but getWebData needs
> constant offset, but here it seems to change every day.
>
>
>

Mon Apr 8, 2019 6:15 pm (PDT) . Posted by:

"Tony Costello" CostelloT

Randy,    Can you point me to instructions/documentation on how to create the security cookie?  I am not sure if this is possible with the version of Office that I have:  "Home and Student 2013".
Thanks in advance,
Tony

On Tuesday, April 2, 2019, 3:23:42 AM CDT, Randy Harmelink rharmelink@gmail..com [smf_addin] <smf_addin@yahoogroups.com> wrote:

 

Before accessing the data, you do need to create a security cookie for the site by logging in via the "From Data (Legacy)" option within EXCEL. When I tested the formula earlier, before I sent the reply, I also got "Error" when I first tried the formula. Once I logged in, I got "Total Grade:C".
On Mon, Apr 1, 2019 at 7:50 PM Tony Costello costellot@... wrote:

    I found the Navellier related messages and tried:
=RCHGetTableCell("https://navelliergrowth.investorplace.com/portfolio-grader/stock-report/?q="&B14,0,"Total Grade:")
where B14 contained the symbol AAPL.
The function returned "Error".
Do you think the website has changed recently so it is no longer accessible with the smf function?

Mon Apr 8, 2019 6:35 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

You need to use the IE object from within EXCEL. I usually get there using
keyboard shortcut alt+d+d+w. But you can also use the "From Web (Legacy)"
option. It can be added to the Quick Access Toolbar for easy access.

Then you need to navigate to the web site and log in. Note that it's not a
full IE browser, so it does generate a lot of scripting errors. I sometimes
have to click on the red "x" a few times if it appears to freeze up.

Once logged in, you can just cancel out of the IE session.

Then use the smfForceRecalculation macro to clear out any web pages the
add-in has saved for extracting data. You'd want the add-in to get fresh
copies of web pages post login.

On Mon, Apr 8, 2019 at 6:19 PM Tony Costello costellot@... wrote:

>
> Can you point me to instructions/documentation on how to create the
> security cookie? I am not sure if this is possible with the version of
> Office that I have: "Home and Student 2013".
>
>
>
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Posting Komentar