Power Query Problems

How to Automatically Retrieve and Refresh Treasury Rates in Excel

Algirdas JasaitisAlgirdas Jasaitis Nov 3, 2026 869 views

Question details

The user wants to automate the process of fetching and updating current Treasury interest rates from a website into an Excel workbook.

Automatically Retrieve and Refresh Treasury Rates in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Tracking daily interest rates by connecting a workbook directly to a web-based XML data source.
Observed behavior
The goal is to establish a connection that automatically updates the data upon opening the file, eliminating the need for manual copy-pasting.
Before you start

Ensure you have a stable internet connection and the direct URL or XML link to the Treasury interest rates website before setting up the data connection.

Solution 1Recommended

Use Power Query to Connect and Refresh Data

Power Query allows you to link directly to a web source and set the data to refresh automatically whenever the workbook is opened.

By utilizing Power Query, Excel creates a live bridge to the Treasury website's XML feed. This avoids the repetitive and error-prone process of manually copying and pasting daily interest rates.

1
Navigate to the Data tab

Open your Excel workbook, go to the 'Data' tab on the ribbon, and click 'Get Data' > 'From Other Sources' > 'From Web'.

2
Enter the Website URL

Paste the URL of the Treasury interest rates XML data source into the dialog box and click 'OK'.

3
Load the Data

In the Navigator window, select the relevant data table or XML node that contains the rates, then click 'Load' to import it into your worksheet.

4
Configure Auto-Refresh

Click anywhere inside the imported data table, go to the 'Table Design' or 'Query' tab, click 'Properties', and check the box for 'Refresh data when opening the file'. Click 'OK'.

Use Power Query to Connect and Refresh Data
Automation Complete: Your Excel file is now linked to the live Treasury data and will fetch the latest rates every time you open the workbook.
Efficient Data Management with WPS

Import and Manage Web Data Easily in WPS Spreadsheets

WPS Spreadsheets offers robust data import tools, allowing you to pull information from web pages seamlessly. It provides a lightweight, fast, and highly compatible environment for your daily data tracking needs without complicated setups.

  1. 1. Access Data Tools: Open WPS Spreadsheets, navigate to the worksheet where you want the data, and click on the 'Data' tab in the top menu.
  2. 2. Select Web Import: Click on 'Import Data' and choose the 'Import Data from Web' option from the dropdown menu.
  3. 3. Connect to the Source: Paste the web address of your Treasury data source into the address bar of the prompt and click 'Import'.
  4. 4. Refresh Data: To update the rates in the future, simply navigate to the 'Data' tab and click 'Refresh All' to pull the latest information.
Import web data effortlessly directly into your spreadsheetsFully compatible with Microsoft Excel file formats (.xlsx)Lightweight and fast performance for processing large datasetsFree and intuitive interface with a familiar layout
QA img-9

Frequently Asked Questions

Why isn't my Power Query data refreshing automatically?

Auto-refresh must be explicitly enabled. Right-click your data table, select 'Data Range Properties' or 'Connection Properties', and ensure 'Refresh data when opening the file' is checked.

Can I refresh the Treasury rates data without closing and reopening the file?

Yes, you can manually refresh the data at any time by navigating to the 'Data' tab and clicking the 'Refresh All' button on the ribbon.

Does the web data source need to be in XML format?

While XML is highly structured and ideal for data extraction, Power Query can also successfully extract data tables from standard HTML web pages, CSV files, or JSON feeds.

What happens if the Treasury website changes its URL?

If the source URL changes, your query will fail to refresh and return an error. You will need to open the Power Query Editor, go to 'Source' in the Applied Steps pane, and update the URL to the new address.