+ Reply to Thread
Results 1 to 7 of 7

file download no directlink

  1. #1
    Registered User
    Join Date
    05-02-2012
    Location
    Bangkok, Thailand
    MS-Off Ver
    Excel 2003
    Posts
    24

    file download no directlink

    I need to download a file from the web. There's no direct link so I can't use URLDOWNLOADTOFILE. To download it I have to click the button in the page. Currently is use click and sendkeys when dialog popups. is there any thing else I could do to get that file link or maybe get it just when the dialog popups?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: file download no directlink

    Hello hellowit,

    You can automate clicking the button with VBA . Are you using Internet Explorer as your browser or something else?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    05-02-2012
    Location
    Bangkok, Thailand
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: file download no directlink

    Quote Originally Posted by Leith Ross View Post
    Hello hellowit,

    You can automate clicking the button with VBA . Are you using Internet Explorer as your browser or something else?
    i did use VBA to automate it and i use document.getelementbyid().value and document.getelementbyid().click and then the download dialog popups and then i use sendkeys to send tab and enter. However it is so unstable.

    I just wanna try another method like URLDOWNLOADTOFILE. To my knowledge that only works if I have a direct link to the file I want but in this case I don't. I have to click the <input type="imgae" /> something to download the file.

    So any idea how can I just get the direct link. Or is there a way to do what I did but without the dialog prompt for SAVE OPEN CANCEL and just download the file like in firefox or chrome?

    thanks

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: file download no directlink

    Hello hellowit,

    Can you post the URL so I can examine the web page?

  5. #5
    Registered User
    Join Date
    05-02-2012
    Location
    Bangkok, Thailand
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: file download no directlink

    The page needs login so I will give you the page source instead. the page is in .aspx format.

    To download I need to document.getElementById('lstYear').value = '2012' and document.getElementById('btnGo').click and then the download dialog box will popups. Need login session to download the file by the way forget to mention that but I have no problem with login.
    Attached Files Attached Files

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: file download no directlink

    Hello hellowit,

    The source file is of little value since it is the source of the final output. There is no usable information regarding the link address or which script is called by the element when clicked.

  7. #7
    Registered User
    Join Date
    05-02-2012
    Location
    Bangkok, Thailand
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: file download no directlink

    thanks anyway.

+ 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