Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel import data from web

Status
Not open for further replies.

PhilBreau

Technical User
Dec 14, 2001
108
CA
I'm trying to extract data from Google Finance. Web page I'm using as source:
When I inspect the element on two occasions, the information is different. How do I capture 56.61?



case 1: <span id="ref_674743_l">56.61</span>
case 2: class="unchanged">56.61</span><span></span></span>


Block from inspect:

<div id="price-panel" class="id-price-panel goog-inline-block">
<div>
<span class="pr">
<span id="ref_674743_l" class="unchanged"><span class="unchanged">56.61</span><span></span></span>
</span>
<div class="id-price-change nwp">
<span class="ch bld"><span class="down" id="ref_674743_c">-0.16</span>
<span class="down" id="ref_674743_cp">(-0.28%)</span>
</span>
</div>
</div>
<div>
<span class="nwp">
Jan 30 - Close
</span>
<div class="mdata-dis">
<span class="dis-large"><nobr>TSE
data delayed by 15 mins -
<a href="// class="dis-large">Disclaimer</a>
</nobr></span>
<div>Currency in CAD</div>
</div>
</div>
</div>


Thank you
 
Hi,

What Microsoft Office Application are you using?

You seem to be coding in VB Script.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Where are you running this code?

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top