troubleshooting Question

Paste/parse HTML into excel

Avatar of randys106
randys106Flag for United States of America asked on
Microsoft ExcelSpreadsheets
3 Comments1 Solution705 ViewsLast Modified:
I hate when what should be simple is complicated.  

I want to paste the HTML from the body of a website into my spreadsheet.  When I go to the website, view the source, copy it, and paste it to a cell, the HTML is parsed like I need it (every line in a different cell).  But from VBA when I paste all the HTML is in one cell.  How do I fix this?

Here is my code and spreadsheet.  Note that there are two sheets (one like VBA gives it to me, one like I want it to be).

Thanks.
Dim IE As Object

Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "http://www.j-archive.com/showgame.php?game_id=3639"

Do Until IE.ReadyState = 4: DoEvents: Loop

Sheets(1).Range("A1").Value = IE.document.Body.innerHTML

Open in new window

Pasting-Issues.xlsx
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros