Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Retrieving data from Web page 2

Hi,

I have tried this also, I don't see the data from the webpage.

How to resolve?


http://www.investor.reuters.wallst.c...asp?ticker=IBM

Trying to retrieve specific info from the web page.
ie: EPS (TTM) vs TTM 1 Yr. Ago

I can't seem to retrieve any data from the page, I have tried using the
following:

#1:
'Microsoft.XMLHTTP, MS COM object to retrieve data from another website via
HTTP requests
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")

#2:
Set oIE = New SHDocVw.InternetExplorer
'Open the web page
oIE.Navigate
"http://www.investor.reuters.wallst.com/stocks/Ratios.asp?ticker=IBM


What is the best way to retrieve the data from this page?


Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Retrieving data from Web page 2

The methods you show are valid, but again you have provided no details of what you've tried and exactly in what way they didn't work
for you...

How/where are you trying to "see" the data?

--
Tim Williams
Palo Alto, CA


"user88" wrote in message ...
Hi,

I have tried this also, I don't see the data from the webpage.

How to resolve?


http://www.investor.reuters.wallst.c...asp?ticker=IBM

Trying to retrieve specific info from the web page.
ie: EPS (TTM) vs TTM 1 Yr. Ago

I can't seem to retrieve any data from the page, I have tried using the
following:

#1:
'Microsoft.XMLHTTP, MS COM object to retrieve data from another website via
HTTP requests
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")

#2:
Set oIE = New SHDocVw.InternetExplorer
'Open the web page
oIE.Navigate
"http://www.investor.reuters.wallst.com/stocks/Ratios.asp?ticker=IBM


What is the best way to retrieve the data from this page?


Thanks.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default Retrieving data from Web page 2

Dear Customer,

I agree Tim's suggestion?
What is the data you are trying to get and what trouble did you encounter?
e.g. if you use the approach 2, the IE window should show the page just as
you open the IE and input the URL and press Enter.
So I just wonder what is your concern now?

<quote
#2:
Set oIE = New SHDocVw.InternetExplorer
'Open the web page
oIE.Navigate
"http://www.investor.reuters.wallst.com/stocks/Ratios.asp?ticker=IBM
</quote

Thanks!

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Retrieving data from Web page 2

You can use an Excel web query, but make sure you select the "Entire Page"
option.
I'm not HTML expert, but it looks like the data is not really in a table but
in DIV/SPAN tags, so Excel can parse it as it in TABLE/TR/TD tags.
You'll have to do work then to get the data separated.

NickHK

"user88" wrote in message
...
Hi,

I have tried this also, I don't see the data from the webpage.

How to resolve?


http://www.investor.reuters.wallst.c...asp?ticker=IBM

Trying to retrieve specific info from the web page.
ie: EPS (TTM) vs TTM 1 Yr. Ago

I can't seem to retrieve any data from the page, I have tried using the
following:

#1:
'Microsoft.XMLHTTP, MS COM object to retrieve data from another website

via
HTTP requests
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")

#2:
Set oIE = New SHDocVw.InternetExplorer
'Open the web page
oIE.Navigate
"http://www.investor.reuters.wallst.com/stocks/Ratios.asp?ticker=IBM


What is the best way to retrieve the data from this page?


Thanks.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Retrieving data from Web page 2

That should read "...so Excel cannot parse... "

NickHK

"NickHK" wrote in message
...
You can use an Excel web query, but make sure you select the "Entire Page"
option.
I'm not HTML expert, but it looks like the data is not really in a table

but
in DIV/SPAN tags, so Excel can parse it as it in TABLE/TR/TD tags.
You'll have to do work then to get the data separated.

NickHK

"user88" wrote in message
...
Hi,

I have tried this also, I don't see the data from the webpage.

How to resolve?


http://www.investor.reuters.wallst.c...asp?ticker=IBM

Trying to retrieve specific info from the web page.
ie: EPS (TTM) vs TTM 1 Yr. Ago

I can't seem to retrieve any data from the page, I have tried using the
following:

#1:
'Microsoft.XMLHTTP, MS COM object to retrieve data from another website

via
HTTP requests
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")

#2:
Set oIE = New SHDocVw.InternetExplorer
'Open the web page
oIE.Navigate
"http://www.investor.reuters.wallst.com/stocks/Ratios.asp?ticker=IBM


What is the best way to retrieve the data from this page?


Thanks.








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Retrieving data from Web page 2

If using IE automation, you can access information from the page based on the id of the surrounding <span element

Eg:

msgbox oIE.document.getElementById("LastChange_spQuoteLas t").innerText
msgbox oIE.document.getElementById("LastChange_lblCurrenc y").innerText


where oIE is the IE object you're controlling.

--
Tim Williams
Palo Alto, CA


"NickHK" wrote in message ...
You can use an Excel web query, but make sure you select the "Entire Page"
option.
I'm not HTML expert, but it looks like the data is not really in a table but
in DIV/SPAN tags, so Excel can parse it as it in TABLE/TR/TD tags.
You'll have to do work then to get the data separated.

NickHK

"user88" wrote in message
...
Hi,

I have tried this also, I don't see the data from the webpage.

How to resolve?


http://www.investor.reuters.wallst.c...asp?ticker=IBM

Trying to retrieve specific info from the web page.
ie: EPS (TTM) vs TTM 1 Yr. Ago

I can't seem to retrieve any data from the page, I have tried using the
following:

#1:
'Microsoft.XMLHTTP, MS COM object to retrieve data from another website

via
HTTP requests
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")

#2:
Set oIE = New SHDocVw.InternetExplorer
'Open the web page
oIE.Navigate
"http://www.investor.reuters.wallst.com/stocks/Ratios.asp?ticker=IBM


What is the best way to retrieve the data from this page?


Thanks.






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Retrieving data from Web page 2


Using this method,

set mypagethtml = ie.document
Set tr = myPageHtml.body.createTextRange
Set tbl = myPageHtml.getElementById("<TableName")

tr.moveToElementText (tbl)

I've got a bit of a problem since there are two tables with the sam
name on the html document and I need the second of the two. How woul
I go about moving to the second table so that I can copy it? I'v
pulled what little hair I have left out over this one.

Thanks,
Mjac

--
mjack00
-----------------------------------------------------------------------
mjack003's Profile: http://www.excelforum.com/member.php...nfo&userid=514
View this thread: http://www.excelforum.com/showthread.php?threadid=55750

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Retrieving data from Web page 2

dim cTables as object
set cTables = myPageHtml.getElementsByTagname("table")

will return a collection of the tables in the page.
Use cTables(1) or whichever represents the table you want.

Tables do not typically have a "name" attribute, and there should not be 2 elements with the same "id"...

--
Tim Williams
Palo Alto, CA


"mjack003" wrote in message
...

Using this method,

set mypagethtml = ie.document
Set tr = myPageHtml.body.createTextRange
Set tbl = myPageHtml.getElementById("<TableName")

tr.moveToElementText (tbl)

I've got a bit of a problem since there are two tables with the same
name on the html document and I need the second of the two. How would
I go about moving to the second table so that I can copy it? I've
pulled what little hair I have left out over this one.

Thanks,
Mjack


--
mjack003
------------------------------------------------------------------------
mjack003's Profile: http://www.excelforum.com/member.php...fo&userid=5141
View this thread: http://www.excelforum.com/showthread...hreadid=557507



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Retrieving data from Web page 2


Thanks for the reply Tim. I didn't mention in my first post that the
two tables not only have identical names but ID's also. Don't know why
our IT dept created the GUI the way they did but the only way to access
the second table was to use an index. Hope this helps anyone with a
similar problem.

Best Regards,
Mjack


--
mjack003
------------------------------------------------------------------------
mjack003's Profile: http://www.excelforum.com/member.php...fo&userid=5141
View this thread: http://www.excelforum.com/showthread...hreadid=557507

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
retrieving data Jess Excel Worksheet Functions 1 February 13th 07 04:54 PM
Retrieving SQL data into Excel Rob Setting up and Configuration of Excel 1 June 27th 06 11:18 PM
Retrieving data from the web - help ! glynny Excel Worksheet Functions 0 February 20th 06 02:04 AM
Retrieving Web Data leafsfan1967[_6_] Excel Programming 6 June 25th 05 06:47 PM
Retrieving data Alan M[_2_] Excel Programming 5 March 24th 05 12:27 PM


All times are GMT +1. The time now is 05:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"