LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default opening webpage in excel

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


Mike NG wrote in message
...
On Sat, 12 Jul 2003 at 16:13:21, Rod (Rod ) wrote:
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.marke****ch.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
--
Mike



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel on Webpage Caz Excel Discussion (Misc queries) 0 March 1st 08 03:50 AM
restrictions in excel opening webpage ?? Andrew Excel Discussion (Misc queries) 0 October 1st 06 09:34 PM
Excel into webpage PCJR New Users to Excel 1 July 11th 06 02:54 PM
Webpage in excel, bioyyy Excel Discussion (Misc queries) 0 April 8th 06 04:46 AM
photos on excel webpage Eileen Excel Worksheet Functions 2 June 10th 05 07:25 PM


All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"