Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting IE data into Excel

Status
Not open for further replies.

makavity

Programmer
Nov 23, 2003
36
US
My company is moving a lot of our reporting to Internet Explorer. In doing this, they have set it up to require a log-in, then you make selections on the IE web page, however each report does not have a unique address. The remains constant as you navigate to the correct report.

I'm trying to create a macro to pull a few reports by navigating to the web site, logging in with my userid & password... then taking a list of numbers to enter into blank fields... then clicking on "Submit"... which may not always be in the same location... then importing some of the info into Excel.

Ex. Navigate to " then Log in with "MyId" and "MyPassword" click on the Submit box, then enter (Item #1) from my Excel sheet, click Submit, grab info, click on the price tab, grab info, back out to the Item input screen and do it again for (Item #2).

Once it's all in Excel I can bounce the numbers around enough to do what I need to do. I'm a decent excel user, just dabbling in VB now... so can you reply as if I know NOTHING...

My starting point is:
Sub Read_URL_Test()
With ActiveSheet.QueryTables.AddConnection:="URL; Destination:=Range("a1"))'write web-page to sheet

.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
End Sub

But this only pulls the info from the specific page... so looking to enter info onto the IE screen (id, pass, items, etc) before pulling the data.

Thanks,
JR
 
makavity,
These may be of some help to you.
[tab]faq707-6400 : WebQuery for web sites that require a log in
[tab]faq707-6399 : How to automate web forms from VBA using Internet Explorer

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Thanks! I'll check them out. They look pretty involved, so a good opportunity to learn.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top