Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
retrieving data | Excel Worksheet Functions | |||
Retrieving SQL data into Excel | Setting up and Configuration of Excel | |||
Retrieving data from the web - help ! | Excel Worksheet Functions | |||
Retrieving Web Data | Excel Programming | |||
Retrieving data | Excel Programming |