Thread
:
How locate connection information for web query?
View Single Post
#
10
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
How locate connection information for web query?
If you recorded a macro while doing a refresh and without seeing
it,something like this.
for each c in symbolslist
="htttp:etcetcetc"&c
do your refresh thing
next c
--
Don Guillett
SalesAid Software
"quartz" wrote in message
...
Great! That did the trick! Thanks so much!
Now I guess if I want the data in a certain order/format, I need to just
write some code to grab what I need, then loop to the next stock...any
thoughts/shortcuts on this?
Thanks again.
"Don Guillett" wrote:
Yes, how did it work for you?
--
Don Guillett
SalesAid Software
"quartz" wrote in message
...
Thanks Don. After right clicking, I selected "Export to Excel" is
that
right?
Thanks a lot to both you and Tom for your help.
"Don Guillett" wrote:
In later versions of excel you can right click in the body of the
web
site
and download to an excel file. This creates a query. Then you can
record
a
macro while using dataedit query. Then you can see how to change
the
parameters in the resulting macro.
--
Don Guillett
SalesAid Software
"Tom Ogilvy" wrote in message
...
do the query manually at the yahoo site, then look at the
resulting
URL.
--
Regards,
Tom Ogilvy
"quartz" wrote in message
...
Thanks Dick.
Once I have the "URL" there is usually some short string that
follows
the
URL that allows you to specify what stock or stocks you want
data
on.
How
do
I locate that info?
Can I go to "View" then "Source" and find it in the HTML code
for
the
page?
Do I have to search the provider's web site for it? How do I get
that
crucial
bit of info?
Thanks much in advance for your assistance.
"Dick Kusleika" wrote:
quartz
Open your browser and point to the page you want. Copy the
URL
from
the
browser and paste it into your code. Don't forget to add URL;
to
the
front
if you accidently paste over it.
--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com
quartz wrote:
I am new at working with web queries, and I am attempting to
build
some
code that will download stock quotes. I know that there are
some
canned
programs out there, but I want to learn by building this
myself.
Some
of
my VERY basic code so far is below.
QUESTION: The one question that I can't seem to find any
discussions
on is
how the heck does one locate the connection string to
connect,
say,
to
Yahoo.com or to Microsoft.com to import stock info?
Set qts = ActiveSheet.QueryTables
Set qt = qts.Add("URL;
http://www.HOW
DO i FIND WHAT THE HECK
GOES
HERE",
Application.Range(ActiveCell.Address))
With qt
.WebSelectionType = xlSpecifiedTables
'.WebTables = "1"
.WebFormatting = xlWebFormattingAll
.RefreshStyle = xlOverwriteCells
.BackgroundQuery = False
.AdjustColumnWidth = True
.Refresh 'BackgroundQuery:=False
End With
Please help and be gentle to this starter...thanks in
advance.
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]