[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Excel VBA automation: Download data from Internet Explorer

Asked by robofix in Visual Basic Programming, Automation, Microsoft Excel Spreadsheet Software

Tags: automation excel vba ie

Hi experts,
my task is the following:
I am to download files from a login-protected web site (in fact, it is a data provider).
I'd like to be logged in already, use the corresponding Internet Explorer window/tab, and have the macro run through a list of codes that would have to be entered on the web page.

Difficulties and open questions:
1. How can I use an already opened IE window, so that I do not have to go through the log in procedure for every code I download data from? All the examples about IE automation I've seen in VBA included creating a new IE object and navigating to the target site - that's what I'd like to avoid for speed and complexity reasons. Let's assume the page is already loaded and logged in.
2. For some codes, no data will exist and IE will display an error message (as a dialog box with an OK button). The macro must account for that in the sense that it pushes ok, and goes on with the next code.
3. If the code request is successful, there is a button to be clicked, which triggers the download of the desired file through a Javascript. The file is to be saved (not opened), filename should correspond to the code that was used for the request.

I'd be thankful if you could indicate how to solve a few (or all ;) of these issues, as well as warn me if you think that some of these steps are unsolvable with Excel VBA.

Best,
Robofix
[+][-]11/06/09 06:57 PM, ID: 25764785Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/07/09 03:48 AM, ID: 25765909Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/07/09 09:33 PM, ID: 25769514Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625