LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Can I import raw HTML source code into Excel?


..Document.Body.outerHTML

Tim


"got mike?" wrote in message
...
okay, that works for the title, but i'm trying to parse the actual html to
pick out data in the middle of the page. how would you alter this to
search
to just get the raw html code on the page?

"Jake Marx" wrote:

Hi Jon,

Here's a function that should return the page title of an HTML document
(or
an empty string if URL is invalid or can't be found):

Public Function gsGetURLTitle(rsURL As String) As String
Dim ie As Object

Set ie = CreateObject("InternetExplorer.Application")

With ie
.Navigate rsURL
Do While .Busy And Not .ReadyState = 4
DoEvents
Loop

gsGetURLTitle = IIf(StrComp(.Document.Title, _
"Cannot find server", vbTextCompare) = 0, _
vbNullString, .Document.Title)
.Quit
End With

Set ie = Nothing
End Function

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com



 
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
How to import html file in excel 2007 AeonBlue Excel Discussion (Misc queries) 2 June 5th 07 11:27 PM
HTML TAGS that format Data for import into Excel Warren LaFrance Excel Programming 1 November 5th 03 03:46 PM
Import HTML reports into Excel with page formatting options Joe McCormick Excel Programming 0 October 3rd 03 09:13 PM
Parsing Data From HTML Source into Excel using VBA Peter Dickson Excel Programming 1 July 9th 03 11:00 PM
Calling HTML Source code from within VBA for Excel Peter Dickson Excel Programming 0 July 9th 03 08:38 PM


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