Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don- thank you for your generous offer. Unfortunately, the URL is on a secure
site, and I have no way to give access to others; the good news is that I can right-click and I see that the page source contains the information I want to scrape with RegEx, so really any web page will do. Here is a test case: * Open IE * Navigate to www.google.com (or an alternate address of your preference) * Click View/Source - this will bring up the page source in notepad The part I'm missing is how to get this source automatically from an "already open" IE window into Excel as a string. With Google it would be easy to open the URL directly from Excel VBA, but my challenge is to capture that text string directly from an already open browser window. I've been abusing code snippets from all sorts of sources (non-VBA sites, etc) but haven't gotten anywhere. I expect it will be something like: Dim IE As SHDocVw.InternetExplorer Do MsgBox IE.document '.body.innerHTML? Loop I appreciate your time and expertise, and any advice you might be able to offer. Thank you! Keith "Don Guillett" wrote: There may be a way but witout seeing all the info, it's hard to say. Give urls and the desired. OR, If desired, send your file to my address below along with this msg and a clear explanation of what you want and before/after examples. -- Don Guillett Microsoft MVP Excel SalesAid Software "ker_01" wrote in message ... Thanks to Ron and ryguy for responses to an earlier thread- I asked my question poorly and the thread died, so here goes another try. I have a series of web pages that for the sake of convenience, I really can't access programatically with Excel (I know it is probably possible, but there are several pages of data entry to get to the target pages, and it isn't practical) So, I'm perfectly willing to access the web page directly in IE6. However, I want to scrape the target page's source and pull a bunch of data into Excel. This web page design prevents copy/paste, so my only way to scrape the data is from the page source (or hand-retype all the data, which is what I'm trying to avoid). I haven't found any information on how to get Excel to interact with an existing IE6 instance and grab the page source on the fly (when a macro runs). Can anyone point me in the right direction? Also, I'm currently on IE6, but if a newer version of IE would make this easier to program, I'd consider upgrading. Many thanks, Keith |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can I change page layout in an entire existing Excel workbook? | Excel Discussion (Misc queries) | |||
workbooks.open function fails to open an existing excel file when used in ASP, but works in VB. | Excel Programming | |||
Open existing Excel file | Excel Discussion (Misc queries) | |||
Trying to open an existing Excel file in C# | Excel Programming | |||
Open only existing Excel Files in a given Range | Excel Programming |