Posted to microsoft.public.excel.programming
|
|
How locate connection information for web query?
Use Yahoo!
--
Don Guillett
SalesAid Software
"James" wrote in message
...
I just made the test:
- from the office, do not save encrypted pages set: worked
- from home, do not save encrypted pages set: did not work
- from home, do not save encrypted pages cleared: work (I was amazed at
this
stage)
- tried again, do not save encrypted pages cleared: worked again
- tried again, this time with do not save encrypted pages set: worked
again
!!! = disappointment. So, what it looks to me is either it is a "random"
phenomenon, or moneycentral has some add server with an add rotator that
appears only once in a while and screws up things. Since I have an add
blocker, I cannot tell which it is.
In conclusion, I'm going to look into writing a program to pull the quotes
in plain html text and forget about Excel.
Anybody here knows a way of getting the html string served by a web site?
I used to be VB programmer, but the WebBrowser object doesn't navigate
outside of your domain since IE 6.0.
"Don Guillett" wrote:
Goto internet explorertoolsinternet optionssecurity(near the
bottom)uncheck "do not save encrypted pages to disk"applyOK
--
Don Guillett
SalesAid Software
"James" wrote in message
...
Maybe the site changed, but not in a way that I noticed. Could be
cookies
or
ads. The site is MSN's moneycentral.com, and I get my quotes manually
just
the same as 6 months ago.
http://moneycentral.msn.com/scripts/...mbol=CAL%2CGLW
Besides, in the "Edit Web Query" dialog, I can navigate to the page
and
see
the table I need, without the yellow arrows and the "Import" button is
disabled.
I then have to click the yellow-arrow-red-cross icon twice, and the
yellow
arrows appear plus the "Import" button becomes enabled. Then, when I
select
the table I need and click Import, I get the error again.
"Don Guillett" wrote:
Might be because the site changed. goto it manually and see what you
get.
--
Don Guillett
SalesAid Software
"James" wrote in message
...
I'd be careful about using WebQueries for anything serious. I have
been
using
them for more than 6 months now in Excel 2003, and 2 days ago my
query
suddenly stopped working. You get a silly error message "The
internet
site
reports that a connection was established but the data is not
available".
Nothing about this error in the Knowledge Base. There are about 20
posts
about this problem in several MSDN newsgroups, and nobody ever got
an
answer
that solved their problem. The only answer I saw is "make sure
your
URL
includes .html".
"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.
|