For analysts & finance pros

Connect Excel & ODBC

Pull the sample databases straight into Microsoft Excel — no coding required. Three paths, all read-only: native SQL Server, an ODBC DSN, or the Web API via Power Query.

This guide is for analysts and finance professionals who want to work with real data in the tools they already know. You’ll connect Excel to the sample SQL Server databases three ways.

🦫 Want a real SQL client instead?

Excel is great for reporting, but if you're here to learn SQL, DBeaver is a free, open-source database tool that gives you a proper query workbench. Same credentials as below — see the DBeaver connection guide →

On this page

Connection details

Direct database access (the native SQL Server and ODBC paths below) is read-only and uses a login that comes with your CPE Today enrollment. Prefer no login at all? The Web API path is completely open — anyone can use it free.

🔑 Getting your username & password

The direct-connection credentials are included — at no extra cost — with any CPE Today database or Excel course. Enroll once and you’ll receive the server login to use everywhere below, plus guided lessons that walk you through it step by step.

Get access with a CPE Today course →

🗄️ SQL Server (recommended)

Serverlearnsql.cpetoday.com
Port1433
Databasesnorthwind, classicmodels, adventureworks, contoso, dvdrental, world, …
Username & passwordIncluded with your CPE Today course
AuthenticationSQL Server login (not Windows)

🐬 MySQL / MariaDB

Serverlearnsql.cpetoday.com
Port3306
Databasesacme, northwind, world, …
Username & passwordIncluded with your CPE Today course

⚠️ Type your password carefully

This server automatically blocks IP addresses after repeated failed logins (it doubles as a security honeypot). If you mistype your password several times you may be temporarily blocked from the whole site — copy-paste it from your course materials to be safe.

Excel → SQL Server (native)

The easiest path — needs no extra software on modern Excel (Microsoft 365, 2016+ on Windows).

  1. On the ribbon go to Data → Get Data → From Database → From SQL Server Database.
  2. In Server, enter learnsql.cpetoday.com,1433 (a comma before the port, not a colon).
  3. In Database, enter a name such as northwind. Leave Data Connectivity mode on Import. Click OK.
  4. When prompted, choose Database on the left, then enter the username and password from your CPE Today course. Click Connect.
  5. If you see a certificate/encryption warning, click OK to proceed (this is a public teaching server).
  6. In the Navigator, tick the tables you want (e.g. Customers, Orders) and click Load.

Tip — filter before you load

Click Transform Data instead of Load to open Power Query, where you can filter rows and pick columns before pulling data into the sheet — much faster on large tables.

Excel → ODBC (DSN)

Use this when you want a reusable named connection, or where the native connector isn’t available. Install Microsoft’s ODBC driver once, define a DSN (Data Source Name), then point Excel at it.

1. Install the driver

Download and install the Microsoft ODBC Driver 18 for SQL Server (free from Microsoft; Windows and macOS).

2. Create a DSN (Windows)

  1. Open ODBC Data Sources (64-bit) from the Start menu.
  2. On the User DSN tab, click Add… and choose ODBC Driver 18 for SQL Server.
  3. Name: LearnSQL. Server: learnsql.cpetoday.com,1433. Click Next.
  4. Choose “With SQL Server authentication”; enter the login and password from your CPE Today course.
  5. Tick Change the default database to and pick e.g. northwind.
  6. On the encryption page set Trust server certificate = Yes (self-signed cert). Finish and Test Data Source — you should see “TESTS COMPLETED SUCCESSFULLY”.

3. Pull it into Excel

  1. In Excel: Data → Get Data → From Other Sources → From ODBC.
  2. Pick your LearnSQL DSN, click OK, supply the credentials again if asked.
  3. Choose your tables in the Navigator and Load.

Prefer a connection string?

Many tools accept one directly:

Driver={ODBC Driver 18 for SQL Server};Server=learnsql.cpetoday.com,1433;Database=northwind;UID=your-username;PWD=your-password;Encrypt=yes;TrustServerCertificate=yes;

Excel → the Web API No login needed

No database drivers and no credentials — Excel’s Power Query reads the open JSON API directly. This path is free for everyone and a great way to learn how APIs work while staying in Excel.

  1. Go to Data → Get Data → From Other Sources → From Web.
  2. Paste an API URL, for example:
    https://learnsql.cpetoday.com/api/mssql/northwind/Customers?limit=100
  3. Click OK. When the query editor opens, expand the data list, convert it To Table, then expand the record columns.
  4. Click Close & Load to drop the results into a sheet.

Build the URL visually first

Use the Playground to construct your query — it shows the exact URL to paste here, plus the SQL behind it.

Refreshing & sharing

Troubleshooting

SymptomFix
“Cannot connect” / timeout Your network may block outbound port 1433 (or 3306). Try a different network, or use the Web API method (port 443/HTTPS) instead.
SSL / certificate error Set Trust Server Certificate = Yes (DSN) or add TrustServerCertificate=yes to the connection string. Driver 18 encrypts by default and rejects the self-signed cert otherwise.
“Login failed for user” Check the username/password and that you chose SQL Server authentication, not Windows. Repeated failures can get your IP blocked — wait, then copy-paste the exact credentials.
Wrong server format SQL Server uses a comma for the port: learnsql.cpetoday.com,1433. A colon will fail.
Table name has spaces Fine in Excel’s Navigator. In hand-written SQL, wrap it in brackets: [Order Details].
Build a query in the Playground →