Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get source from a web page into a worksheet
I have often written macros that import data from a web page into a
worksheet. Now I need to get the source code from the web page into the worksheet. (The source is what you get when, in Internet Explorer, you right click on a page and selece "view source".) Is there any way I can do this? Many thanks for any help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get source from a web page into a worksheet
NS
Here's a sub that will get the HTML between the body tags. Sub GetSource() Dim ieApp As InternetExplorer Set ieApp = New InternetExplorer ieApp.Navigate "http:\\www.dicks-clicks.com" Do Loop Until ieApp.ReadyState = READYSTATE_COMPLETE Debug.Print ieApp.Document.body.innerhtml End Sub That won't be everything you get when you View Source, but it's a start. Check here http://msdn.microsoft.com/library/de...s/document.asp for documentation on the Document object and maybe you can find something to get what you want. -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com wrote in message ... I have often written macros that import data from a web page into a worksheet. Now I need to get the source code from the web page into the worksheet. (The source is what you get when, in Internet Explorer, you right click on a page and selece "view source".) Is there any way I can do this? Many thanks for any help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
creating drop down lists from source on another page | Excel Worksheet Functions | |||
Display the source for a pivot table page field | Excel Worksheet Functions | |||
EXCEL - Auditing - TRACE to show source from another page | Excel Worksheet Functions | |||
Converting a muliple page worksheet to a single page worksheet | Excel Discussion (Misc queries) | |||
Viewing source code when saved as web page | Excel Discussion (Misc queries) |