+ Reply to Thread
Results 1 to 3 of 3

Handling HTML dialog box to download file from website?

  1. #1
    Registered User
    Join Date
    12-15-2010
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    15

    Handling HTML dialog box to download file from website?

    Hi all, quick question.

    Essentially, I am connecting to a web server through VBA, filling out a form by identifying the element names in the HTML of the webpage and posting the form to the site. That part works fine, and the report is generated on the screen. However, at that point, I'd like to be able to write some VBA code that will use the "Export" option on the webpage, in order to download the data for further manipulation.

    The HTML code is below (side note: I hate whoever built this website for naming their page elements so nondescriptly....)

    Please Login or Register  to view this content.
    Selecting the file format is easy....I want to download it in CSV format which is simply

    Please Login or Register  to view this content.
    However, when I use the ".Click" property of the "Export" link (which is named rvReportsMain_ctl01_ctl05_ctl01), a new browser window and dialog box flash onto the screen briefly before disappearing. It's as if "Cancel" is the default setting for handling the dialog box, whereas I'd like it to "Save" the file, so I'm stuck at this point not knowing how to handle this problem.

    The page uses Java functions, and I'm wondering if I'd need to somehow pass a parameter to one of the functions (perhaps "ReportViewerLink"?) in order to have it automatically download the file rather than cancelling. I'm also hoping there is an easy way to do this that doesn't require getting too technical with HTTPS and SSL connections....

    Thanks in advance.

  2. #2
    Registered User
    Join Date
    12-15-2010
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Handling HTML dialog box to download file from website?

    One-time bump

  3. #3
    Forum Contributor
    Join Date
    07-13-2007
    Posts
    151

    Re: Handling HTML dialog box to download file from website?

    Try explicting setting the selectedindex property of the SelectElement. I'm guessing that just setting the Value property isn't changing the selected index, so you're not making it past the first thing the script does. Which is to return false if selectedindex=0.


    Please Login or Register  to view this content.

    Good luck with it...

    Shred

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1