+ Reply to Thread
Results 1 to 7 of 7

Exporting Website Data into Excel?

  1. #1
    Forum Contributor
    Join Date
    12-30-2009
    Location
    US
    MS-Off Ver
    Excel 2003, 2010, 2016, 2019, & Office 365
    Posts
    194

    Exporting Website Data into Excel?

    Hi all,

    I have been trying to find a way to pull some data from a website into excel. Ultimately, I would like to import all these Libor Interest Rates here (https://www.wsj.com/market-data/bonds) into excel and have some way to schedule this task daily. I tried using "Get External Data from Website" on the Data tab, but I just get a bunch of script errors and nothing works.

    Can anyone help point me in the right direction of the best way to do this?

    I'm using Excel 2010.

    Thanks,

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Exporting Website Data into Excel?

    Using Power Query. I went to Data, Get Data from Web.

    Attached is the file with both tables from the website. I did not do anything further than to load them. No PQ actions taken. I am using Excel 2019 which has PQ as part of the Native Excel. You may need to download PQ from MS to make this happen if you are using 2010.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Exporting Website Data into Excel?

    In case of you dont have PQ, you can use the below code for the query you need;

    Please Login or Register  to view this content.
    .

  4. #4
    Forum Contributor
    Join Date
    12-30-2009
    Location
    US
    MS-Off Ver
    Excel 2003, 2010, 2016, 2019, & Office 365
    Posts
    194

    Re: Exporting Website Data into Excel?

    Dude, alansidman, that is exactly what I need.

    Yeah, I couldn't do it with the older version that does not include Power Query.

    Here is another question, which may not be specific to Excel.

    I want to generate a daily excel file which obtains the updated rates. Is there a way in Excel to do this or would I need to setup some kind of external script? I'm not too familiar with how I would setup a command prompt/batch file to execute such a thing, but I'm sure there is a way.

  5. #5
    Forum Contributor
    Join Date
    12-30-2009
    Location
    US
    MS-Off Ver
    Excel 2003, 2010, 2016, 2019, & Office 365
    Posts
    194

    Re: Exporting Website Data into Excel?

    Haluk, also very nice and works for my older version.

    Thanks to you both!

  6. #6
    Forum Contributor
    Join Date
    12-30-2009
    Location
    US
    MS-Off Ver
    Excel 2003, 2010, 2016, 2019, & Office 365
    Posts
    194

    Re: Exporting Website Data into Excel?

    Haluk,

    How does the script know to pull the Libor Rates? I don't see where the script is getting that information from the site. What if I wanted to use this script to pull other data, such as the Consumer Rates on the same page?

    Thanks,

  7. #7
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Exporting Website Data into Excel?

    Rick;

    It just depends on the index of the table you want to fetch the datas from.

    For example; if you need the datas from the Consumer Rates table, it means that you need the 3rd table on the web page. But, the table indexes are zero based in the code. Which means; 3 - 1 = 2 is the table index we are looking for.

    So, you can just make the following small change in the code to get the related data from the Consumer Rates table.

    Please Login or Register  to view this content.

    .
    Last edited by Haluk; 07-10-2019 at 04:25 PM.

+ 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. Exporting Content from Website to Excel
    By hreese in forum Excel General
    Replies: 1
    Last Post: 03-20-2016, 09:24 AM
  2. website scrapiplping to get data from multiplepages of website
    By mpatil in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-17-2015, 05:00 AM
  3. cgi-bin website exporting
    By tinapilna in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-19-2013, 06:57 PM
  4. Opening website, getting data, closing website
    By beta_leonis in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2012, 03:50 AM
  5. Exporting search results from website
    By kucinskij in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-22-2011, 07:13 AM
  6. Exporting to website
    By QUIZTOON in forum Excel General
    Replies: 0
    Last Post: 03-10-2006, 07:40 PM

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