MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Can Excel open IE and copy the contents of a page?

Posted by Chris Rock on June 25, 2001 2:35 PM

I have data that is in a table on a webpage on our intranet. I've written a simple macro that takes the data (once copied to the clipboard) and sorts and formats it appropriately.

Can I have excel get the data from Internet Explorer so the user doesn't have to copy it to the clipboard first? All I'd need is to have the macro go to a specific URL and do a select all + copy.

Is this possible using VBA?

I am using Excel 97 and IE 5.5. I have access to Excel 2000, also if it's not possible with '97.

Posted by faster on June 25, 2001 5:05 PM

You can probably do it using "SendKeys".

Posted by faster on June 25, 2001 5:14 PM

Run this from Excel
'Have the webpage open

Sub ThisWorked()
SendKeys "%{tab}"
SendKeys "^{a}"
SendKeys "^{c}"
SendKeys "%{tab}"
SendKeys "^{v}"
End Sub

Posted by doug on July 03, 2001 8:25 AM

Couldn't you create a webquery? Data>get external Data> Create new web query ?