View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
shockley shockley is offline
external usenet poster
 
Posts: 135
Default Web Query general question

Don,

Nice piece of code--thanks! As I noted in my response to Tim, I am able to
get a list of up to 50 symbols per web access with my usual programmed
routine, i.e.,

Sub saveImg(sURL)
Dim oXHTTP As New MSXML2.XMLHTTP

oXHTTP.Open "GET", sURL, False
oXHTTP.send
sTest = oXHTTP.ResponseText

'Parse out info

Set oXHTTP = Nothing
End Sub

But, as the info I want comes back in 68 pages, I would like to get the
server to just stream me the whole load with one access. It would really be
much easier for both of us <g.

Regards,
Shockley


"Don Guillett" wrote in message
...
steel Enter partial company name in cell a1 & touch ENTER key
Symbol Name [up] Market Industry


Just right click on sheet tabview codeinsert thissave.


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then 'GETINFO
Application.ScreenUpdating = False
Rows("3:1000").Delete
ActiveWorkbook.Save
myurl = "http://finance.yahoo.com/l?s=" & [CoName] & "&t=S&m=US"
With ActiveWorkbook.Worksheets("GetSymbols").QueryTable s.Add( _
Connection:="URL;" & myurl, Destination:=[GetSymbols!a5])
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
End With
Rows("3:19").EntireRow.Delete
Columns("e:i").Delete
DeleteNames
Application.ScreenUpdating = True
End If
End Sub
Private Sub DeleteNames()
On Error Resume Next
For Each nm In ThisWorkbook.Names
If nm.Name Like "*ExternalData*" Then nm.Delete
Next nm
End Sub


--
Don Guillett
SalesAid Software

"shockley" wrote in message
...
I would like to know how web queries are set up on the server side (if,
indeed, there is any setup involved), in other words, how do they work?

When I do a web query, am I requesting information from a database on

the
web server, or am I just looking for tables on a particular web page?

To ask with an example, can I submit a web query to this symbol lookup

page
on Yahoo Finance?
http://finance.yahoo.com/l or would I have to query the webpage that
returns results for a typed-in request, for example, this page that is
returned from typing in "Intel" and pressing "Look Up":
http://finance.yahoo.com/l?s=intel&t=S&m=US

If this is a complex issue, I'd appreciate links to articles.

Shockley