Connect Excel or Power BI to the TS API

Modified on Fri, 23 Oct at 11:14 AM

Print

Fetch report data and market data from TS straight into Excel or Power BI. You sign in with your organisation's Microsoft Entra ID account, so you don't need a token.

Before you start

  • Your company uses Microsoft Entra ID. This way of connecting needs an Entra ID account.
  • You have the permission Public API Access in TS. A user who can edit users gives it to you in Roles & Permissions; see TS API for Reports and Market Data.
  • You know which endpoint to call. The same article lists the endpoints and their parameters.

Watch how it works

The video shows the whole flow: fetching report data into Excel, then into Power BI.

Video: fetch report data from the TS API into Excel and Power BI (MP4, 4 MB)

Connect Excel

  1. In Excel, on the Data tab, select From Web.

    The Data tab in Excel, with From Web selected under Get & Transform Data

  2. Enter the endpoint's URL, with your company name in place of CUSTOMERNAME, and select OK. For example, interest rates for 12 March 2024:

    https://ts.treasurysystems.com/tenants/CUSTOMERNAME/api/marketdata/ir/v3?date=20240312

    or a system report, run in real time:

    https://ts.treasurysystems.com/tenants/CUSTOMERNAME/api/reportdata/realtime/v3

    The From Web dialog in Excel, with a TS API URL entered and CUSTOMERNAME selected in it

  3. When Excel asks how to sign in, select Organizational account, then Sign in. Sign in with your Entra ID account, then select Connect.

    The Access Web content dialog, with Organizational account selected and the Sign in button

  4. In Power Query Editor, unpack the data into a table: convert it to a table, then expand its columns until you see the rows you need. The Applied steps in the screenshot show one way, and the video above shows it step by step.

    Power Query Editor showing interest rates by reference rate and period, with the applied steps Source, Navigation, Converted to Table, Expanded Column1, Expanded Rates and Expanded Rates1

  5. Select Close & Load. The data loads into a sheet. To fetch the latest data later, select Refresh All on the Data tab.

Connect Power BI

  1. In Power BI Desktop, select Get data › Web.
  2. Enter the endpoint's URL, as for Excel, and select OK.
  3. Select Organizational account, then Sign in. Sign in with your Entra ID account, then select Connect.
  4. In Power Query Editor, unpack the data into a table, as for Excel.
  5. Select Close & Apply.

Related articles

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article

More in TS Report and Marketdata API

Still need help? Reach people who already know your configuration.

Submit a ticket