Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to read HTML

Hi all,
My function looks like:
Function getWebPage()
Dim loInet As InternetExplorer
Dim lsURL As String
Dim loObject As Object


Set loInet = New InternetExplorer
loInet.Visible = True

lsURL = "http://finance.yahoo.com/"

loInet.Navigate lsURL

End Function

I don't know how to read the HTML site I just opened.

THx

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default How to read HTML

Hi,

You can use the XMLHTTP object to read the HTML:

Public Function gsGetHTML(rsURL As String) As String
Dim x As Object

Set x = CreateObject("Microsoft.XMLHTTP")

With x
.Open "GET", rsURL
.send
Do Until .ReadyState = 4
DoEvents
Loop
gsGetHTML = .ResponseText
End With

Set x = Nothing
End Function

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]


wrote:
Hi all,
My function looks like:
Function getWebPage()
Dim loInet As InternetExplorer
Dim lsURL As String
Dim loObject As Object


Set loInet = New InternetExplorer
loInet.Visible = True

lsURL = "http://finance.yahoo.com/"

loInet.Navigate lsURL

End Function

I don't know how to read the HTML site I just opened.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to read HTML

Thx a lot!
However, your function only print out limit of string (I printed out
..ResponseText). So it only gets 256 chararacters (i am just guessing).
Do you know other way to print out more?

Thx

Reply
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
Stop excel from processing HTML? IE paste raw html. nick Excel Discussion (Misc queries) 2 April 21st 23 05:12 PM
I have a read only xl file, I need it to be read and write drama queen Excel Discussion (Misc queries) 3 July 1st 06 12:25 AM
XCEL FILE REC'D AS READ ONLY -- HOW TO NOT BE "READ ONLY" billybob Excel Discussion (Misc queries) 1 February 13th 06 03:14 AM
How can a file be converted from Read-Only to Read/Write Jim in Apopka Excel Discussion (Misc queries) 2 November 19th 05 04:59 PM
REQ: Simplest way to parse (read) HTML formatted data in via Excel VBA (or VB6) Steve[_29_] Excel Programming 3 August 25th 03 10:43 PM


All times are GMT +1. The time now is 12:58 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"