opening webpage in excel

  • Thread starter Thread starter Rod
  • Start date Start date
R

Rod

Hello,

I used to be able to open a webpage in excel 2000, but I
am having trouble with excel XP. The webpage has several
lines of user defined data but when I open it up in excel
XP, I only get the first line. I have rechecked the
address in IE6 and all the data comes up.
Are the any differences between excel 2000 and excel 2002
in regards to this?
Any ideas would be appreciated.

Thanks in advance
Rod
 
I'm not sure I understand your problem. When I just click on the url below
and goto this site it will accept only ONE symbol at a time. No matter which
xl or how you open would make no difference. Yahoo accepts multiple quotes.
Tell me EXACTLY what you want to do and I will try to help. Or, I can custom
design something.

Sub tryxl()
ActiveWorkbook.FollowHyperlink Address:= _
"http://bigcharts.marketwatch.com/quotes/default.asp"
End Sub

This url DOES allow multiple quotes.
http://bigcharts.marketwatch.com/quotes/multi.asp?view=q&msymb=msft+intc

Now if you want to use the quotes in xl, use a different method.
 
Hi Don,
I am wanting to open this as an Excel spreadsheet so that
I can utilyze the data in my main spreadsheet. When you
open the URL in Explorer it shows a minimum of 3 quotes,
and if you add more, then it will show your entire list.
I used to just use the command in Excel 2000;
Workbooks.Open Filename:= _
"http://bigcharts.marketwatch.com/quotes/default.a
sp"

and it would open the URL in Excel with the multiple
quotes running down the page.
Now when I run the same command in Excel XP only one line
of information appears instead of multiple lines. I hope
that this makes sense.
Rod
 
I don't see how because the site must have the symbols to show. Did you see
the second url I provided with the symbols.
I can custom design something if you want to send your wb to my private
email below.
 
Hi Don,
I am wanting to open this as an Excel spreadsheet so that
I can utilyze the data in my main spreadsheet. When you
open the URL in Explorer it shows a minimum of 3 quotes,
and if you add more, then it will show your entire list.
I used to just use the command in Excel 2000;
Workbooks.Open Filename:= _
"http://bigcharts.marketwatch.com/quotes/default.a
sp"

and it would open the URL in Excel with the multiple
quotes running down the page.
Now when I run the same command in Excel XP only one line
of information appears instead of multiple lines. I hope
that this makes sense.
Correct me if I'm wrong, but if you want to read the data off a webpage,
you're going to have to use automation. This needs extra bits adding to
it to get it to compile, but you should get the important bits out of it



Sub GotoURL(sURL As String)

Dim bPresent As Boolean
Dim sTypeName As String


'GetObject ("",InternetExplorer.Application) will latch on to
'Turnpike is less functional than full IE
'GetObject ("",InternetExplorer) won't latch on to IE at all
'(known feature), so implement our own kind of version which
'does the same sort of thing
sTypeName = TypeName(oIE)

If sTypeName = "Nothing" Or sTypeName = "Object" Then
'Nothing means never initialised
'Object means a previous IE instance has been shut down
Set oIE = New InternetExplorer
Else
'Instance already running
bPresent = True
End If


'All this seems to be necessary too, because it seems to be
'the only way to bring iconised windows back to life because
'there is no WindowState attribute
With oIE
If bPresent Then
If IsIconic(.hWnd) Then
ShowWindow .hWnd, SW_MAXIMIZE
Else
ShowWindow .hWnd, SW_SHOW
ShowWindow .hWnd, SW_MAXIMIZE
End If
Else
ShowWindow .hWnd, SW_MAXIMIZE
End If


.Navigate sURL
End With

While oIE.Busy
DoEvents
Wend

MsgBox oIE.Document.body.innertext
 
Sorry about not being able to clearly articulate my
problem, but if you open the URL in IE6 you get a minimum
of 3 lines of quotes and more if you have put the info in
beforehand. BUT, when you open the same address in Excel
AS A SPREADSHEET, there is a clear difference in that
Excel XP only brings in one quote instead of the multiple
quotes - which is very different to how it looks in IE6,
and that is my problem. The same command in Excel 2000
brought the page in as an Excel spreadsheet exactly the
same as it displayed in IE6 - with all the quotes.
I have tried the multi address but it doesn't provide the
info that I need.
I guess the question is - Why does Excel XP change the
webpage when it imports it into the spreadsheet and is
there any other command to try to bring the page in
another way?
Cheers
Rod
 
Rod,

I KNOW how to do this to bring in as many quotes as I want by using the
query tables method. I have been doing it a long time and custom designing
excel files for quote & historical retrieval to do whatever is desired. I
can store the data, make graphs, etc, etc. etc. As I suggested, you might
want to send me what you have for comments. I also use xl2002 on XP home
OS. I bring all the quotes into a "data" sheet and then use macros and
formulas to get the info to the "pretty sheet".You can then create
profit/loss, total portfolio, charts, etc.
 
For many types of web pages, you can just open them in Excel using file =>
open. You don't need to use a browser control.

Regards,
Tom Ogilvy
 
Back
Top