+ Reply to Thread
Results 1 to 2 of 2

Using VBA to log into a website and download a csv file that appears when chosing timeline

  1. #1
    Registered User
    Join Date
    02-19-2016
    Location
    Oslo, Norway
    MS-Off Ver
    10
    Posts
    1

    Using VBA to log into a website and download a csv file that appears when chosing timeline

    Hello dear friends and excel experts.

    I have a problem that I would like to solve using your expertise.

    I need to download some data from a website using VBA. I know how this can be done, but the process to get the csv file is quite complex.

    1. I have to enter a website.
    2. Then use username and password to login.
    3. Then go to the statistics site.
    4. Chose a timeline, say 2010-2020. This is done by first chosing 2010 from a "from date" dropdown and then chosing 2020 from a "to date" dropdown.
    5. After chosing the from and to date, an excel file will appear with the correct data.
    6. By pressing on the excel file you will automatically download an excel file.
    7. The data must be used in an excel file where I analyze the data.

    Is this possible? Is it possible to be guided on how to achieve the goal? Will this be easier to do using Power BI?

    A appreciate any kind of help.

    Best regards.
    RR

  2. #2
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,987

    Re: Using VBA to log into a website and download a csv file that appears when chosing time

    I've had some success using Selenium for automating Chrome as it seems to be more reliable than IE.
    You need to download an install it on the machine in question, then put a reference to it in the project.

    Download from https://github.com/florentbr/SeleniumBasic/releases
    After installing Selenium, you need to change the chrome driver in the root directory to an updated one. You can download it from here. https://sites.google.com/a/chromium....iver/downloads

    You then need to analyse the website using developer tools and identify the elements you need to interact with.

    Some example code to login to a website and download a file.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA to Download File from ASPX Website
    By ChrisHook in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2019, 01:03 PM
  2. Auto Download File from specific website
    By N323100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2017, 04:44 AM
  3. Download XLS file from a form website ASP
    By Yensang in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-17-2015, 06:21 PM
  4. Download CSV File from Website
    By chinraj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-19-2014, 09:09 AM
  5. Download excel file from website
    By Sharpbangbang in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-10-2013, 12:08 PM
  6. VBA - Go to website and download file from save prompt
    By randiba in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2013, 08:33 PM
  7. file download from website
    By dgkindy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-04-2009, 10:39 AM

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