View Categories

How to Import Any Database into Excel

11 min read

Any Database
Agent
Excel
MICROSOFT EXCEL DATABASE IMPORT

Import Any Database
Directly into Excel

Stop exporting CSV files and wrestling with ODBC drivers. Query Streams imports live data from SQL Server, PostgreSQL, MySQL, Oracle, and more — straight into your Excel spreadsheet, on demand.

10+ Databases Live Data Shareable Queries No Drivers

Query Streams is a secure, real-time database integration platform that lets you import database data into Excel from any supported source — without installing drivers, configuring DSN files, or opening firewall ports. Learn more at QueryStreams.com and sign up for free to start importing live database data into your spreadsheets.

Importing database data into Microsoft Excel is one of the most common tasks for data analysts, finance teams, operations managers, and IT departments. Whether you need to pull data from a SQL Server database for a quarterly report or import PostgreSQL tables into an Excel spreadsheet for ad-hoc analysis, the goal is the same: get live database records into a format you can sort, filter, chart, and share. The challenge has always been how to create that database connection without excessive complexity.

This guide compares four approaches to importing database data into Excel — ODBC drivers, Power Query, VBA macros, and Query Streams — so you can choose the method that best fits your skill level, security requirements, and collaboration needs.

4 Ways to Import Database Data into Excel

There are several established methods for creating an Excel database connection. Each has trade-offs in ease of setup, live data capability, security, and sharing. Here’s how they compare at a glance.

Criteria ODBC Drivers Power Query VBA Macros Query Streams
Ease of Setup Complex — driver + DSN per machine Moderate — built into Excel Hard — requires VBA coding Simple — one-time Agent install
Live / On-Demand Data Manual refresh Scheduled or manual refresh Manual trigger via button On-demand, real-time streaming
Security Credentials on each client Credentials stored in workbook Credentials hard-coded in macro Credentials stay on server only
Firewall Changes Inbound port required Inbound port required Inbound port required Outbound-only (port 443)
Query Sharing Not possible Share workbook only Share macro file only Share queries with filters, hide SQL
Google Sheets Not supported Not supported Not supported Full add-on support
Parallel Queries One at a time Sequential refresh One at a time Multiple simultaneous queries
AI Assistance None None None Nova AI writes SQL from English

Method 1: ODBC Drivers

ODBC (Open Database Connectivity) is the traditional method to import database data into Excel. Originally introduced by Microsoft in 1992, ODBC requires installing a vendor-specific driver on every machine that needs database access, then configuring a Data Source Name (DSN) with the server address, port, credentials, and SSL settings.

For a single developer connecting to one database on a desktop, ODBC works. But it breaks down quickly at any scale:

  • Driver installation on every machine — if your team uses SQL Server, MySQL, and PostgreSQL, that’s three separate drivers per workstation, each with its own version and compatibility quirks
  • 32-bit vs 64-bit conflictsMicrosoft’s own troubleshooting guide dedicates entire articles to diagnosing architecture mismatches between Excel and ODBC drivers
  • Firewall and VPN dependency — ODBC requires direct TCP connections from the client to the database, forcing IT to open inbound ports or require VPN access
  • Credential exposure — database passwords are stored in DSN entries or connection strings on each user’s machine
  • No sharing — there’s no way to share a working database import with a colleague without giving them all the credentials and driver setup instructions

For a deeper comparison, see our full guide: ODBC Alternative for Excel.

Method 2: Power Query

Power Query (Get & Transform Data) is built into Microsoft Excel and offers a GUI-based approach to importing data from databases, files, and web sources. It provides a visual query editor with point-and-click transformations, making it more accessible than raw SQL for basic data retrieval.

However, Power Query has significant limitations for database import workflows:

  • Still requires network access — Power Query connects directly to the database, so you still need VPN or open firewall ports for remote databases
  • Complex for non-technical users — while the GUI is friendlier than raw SQL, transforming and shaping data still requires learning the M language and understanding query folding
  • No real sharing mechanism — you can share the workbook, but the embedded connection (including credentials) goes with it, creating security risks
  • No interactive filters — recipients of a shared Power Query workbook cannot customize parameters without editing the query themselves
  • Excel-only — Power Query does not work in Google Sheets, leaving teams that use Google Workspace without an equivalent option

Method 3: VBA Macros

VBA (Visual Basic for Applications) macros can pull data from databases using ADO or DAO connection objects. This approach gives developers full control over the import process — including pagination, error handling, and custom data transformations — but it comes at a steep cost:

  • Requires programming skills — writing and maintaining VBA database connections is developer-level work that most business users cannot do
  • Maintenance burden — macros break when database schemas change, Excel versions update, or security policies tighten; maintaining VBA across an organization is a full-time job
  • Security risksMicrosoft has increasingly restricted macro execution due to malware risks, and many organizations block macros by default through Group Policy
  • Hard-coded credentials — database connection strings with usernames and passwords are typically embedded directly in the VBA code, visible to anyone who opens the macro editor
  • No collaboration — sharing a macro-driven workbook means sharing the credentials, the code, and the trust required to enable macro execution

Method 4: Query Streams — The Modern Approach

Query Streams takes a fundamentally different approach to importing database data into Excel. Instead of requiring every user to configure their own database connection, you install a single lightweight Agent on your database server (or any machine that can reach the database). The Agent handles all database communication and streams results to end users through a secure, outbound-only connection — no drivers, no DSN, no firewall changes.

Users import data through the Excel add-in or Google Sheets add-on by selecting a saved query from a dropdown, adjusting any available filters, and clicking run. Live results stream directly into the spreadsheet cells.

1

Install the Agent

Download the Query Streams Agent onto your database server or any machine with database access. Available for Windows, macOS, and Linux.

2

Add Your Database

Open the Agent’s local UI and add your database connection. Credentials are stored locally on the Agent and never leave your server.

3

Build a Query

Write SQL in the web portal or let Nova AI generate it from plain English. Save queries with optional interactive filters for dates, regions, or any parameter.

4

Import into Excel

Open the Excel add-in, pick your query, adjust filters, and run. Live data streams into your spreadsheet — import multiple queries in parallel across different tabs.

Share without exposing credentials. Once a query is saved, you can share it with colleagues or external users. Recipients select the query in their Excel add-in, set any available filters, and run it on demand — without ever seeing the SQL code, database credentials, or server address. This is ideal for distributing live reports to non-technical stakeholders.

Why Query Streams Wins for Database Imports

While ODBC, Power Query, and VBA all ultimately get data into Excel, they were designed for a different era — one where every user sat on the same corporate LAN. Query Streams is built for how teams actually work today: distributed, collaborative, and security-conscious.

No Drivers or DSN

Nothing to install on user machines. The Agent handles all database communication server-side, eliminating 32/64-bit conflicts entirely.

Outbound-Only Security

The Agent initiates connections outward over HTTPS (port 443). No inbound firewall ports, no VPN, no exposed database endpoints.

Shareable Queries

Share the ability to run a live query — with interactive filters — without sharing SQL code, database passwords, or server details.

Parallel Query Execution

Launch multiple saved queries simultaneously into different worksheet tabs. The Agent streams each concurrently, regardless of result size.

Nova AI Assistant

Describe what you need in plain English and Nova writes the SQL for you. Generate queries, charts, and insights without writing a single line of code.

Excel and Google Sheets

One platform, one Agent, one set of saved queries — accessible from both Microsoft Excel and Google Sheets with identical functionality.

Supported Databases

Query Streams supports all major relational databases and cloud data platforms. One Agent installation handles every database type — no separate drivers or connectors to manage.

Database Versions / Platforms Guide
Microsoft SQL Server Express, Standard, Enterprise, Azure SQL, AWS RDS Connect to Excel
PostgreSQL All versions, AWS RDS, Azure Database, Google Cloud SQL, Supabase, Neon Connect to Excel
MySQL 5.7+, Amazon RDS, Azure Database for MySQL, Google Cloud SQL, PlanetScale Connect to Excel
MariaDB 10.x, 11.x, SkySQL, all cloud-hosted variants Connect to Excel
SQLite Local .db files on the Agent machine Connect to Excel
Microsoft Access .accdb and .mdb files Connect to Excel
Oracle 11g+, Oracle Cloud, Oracle Autonomous Database Connect to Excel
Snowflake All editions across AWS, Azure, and GCP Connect to Excel
Google BigQuery All project types and regions Connect to Excel
DuckDB Local analytical databases, Parquet/CSV file queries Connect to Excel

More database integrations are coming soon. Each database link above has a dedicated step-by-step guide for both Microsoft Excel and Google Sheets. Deploy multiple Agents across your infrastructure — on-premise, in AWS EC2, Azure VMs, Google Cloud, or any environment globally — and all data sources appear as a unified dropdown list in the query builder.

Frequently Asked Questions

How do I import a database into Excel? +
The simplest way to import a database into Excel is with Query Streams. Install the lightweight Agent on your database server, add your database connection, and save a SQL query through the web portal. Then open the Excel add-in, select your query, and click run — live data streams directly into your spreadsheet. No ODBC drivers, DSN configuration, or firewall changes required. Sign up for free to get started in under 10 minutes.
Do I need ODBC drivers to import database data into Excel? +
No. While ODBC is the traditional method, Query Streams eliminates the need for ODBC drivers entirely. The Agent runs server-side and handles all database communication, so users connect through the Excel add-in with zero local software installation. This also eliminates the common 32-bit vs 64-bit driver conflicts. See our ODBC Alternative for Excel guide for a detailed comparison.
Can I import from multiple databases at the same time? +
Yes. Query Streams supports parallel query execution, meaning you can launch multiple saved queries simultaneously — for example, five queries from three different databases into five different worksheet tabs. The Agent streams each result set concurrently regardless of size. You can also deploy multiple Agents across your infrastructure, and all data sources appear in a unified dropdown list.
Is the import live or a one-time snapshot? +
Every import through Query Streams pulls live, on-demand data from your database at the moment you click run. There is no stale cache or scheduled snapshot — you always get the current state of your data. You can re-run any query at any time to refresh the results, and you can set up automatic scheduling through the automation features for recurring reports.
Can I share imported data with other Excel users? +
Yes, and this is one of the biggest advantages over ODBC, Power Query, or VBA. With Query Streams, you share the interactive capability to run a query — not just static data. A shared user independently selects the query from their own Excel add-in, adjusts any available filters (dates, regions, categories), and runs it to get live data on demand, anytime, anywhere. They never see the SQL code, database credentials, or server address.
Does this work with cloud databases like AWS RDS, Azure SQL, and Google Cloud SQL? +
Absolutely. Query Streams Agents can be installed on any machine that can reach your database — an on-premise server, an AWS EC2 instance, an Azure VM, or a Google Compute Engine instance. For cloud databases, deploy the Agent in the same cloud region as your database for optimal performance. All cloud database variants are supported, including AWS RDS, Azure SQL Database, Azure Database for PostgreSQL/MySQL, Google Cloud SQL, Snowflake, and BigQuery.
How secure is importing database data into Excel with Query Streams? +
Query Streams uses an outbound-only security model. The Agent initiates a WebSocket connection outward over HTTPS (port 443) — your database port is never exposed to the internet, and no inbound firewall rules are needed. Database credentials are stored exclusively on the Agent server and never transmitted to users. End users authenticate through the Query Streams portal, and query access is controlled through sharing permissions. This is significantly more secure than ODBC (credentials on every client) or VBA (credentials embedded in macro code).
Can I use Query Streams to import data into Google Sheets too? +
Yes. The same Agent, saved queries, and interactive filters work identically in both Microsoft Excel (via an add-in) and Google Sheets (via an add-on). This is a major advantage over ODBC, Power Query, and VBA, which are all Excel-only on Windows. Install the Google Sheets add-on to start importing database data into Google Sheets.

Get Started

Import Any Database into Excel in Under 10 Minutes

One Agent installation connects all your databases to Microsoft Excel and Google Sheets — no drivers, no DSN, no firewall changes. Sign up free, install the Agent, and run your first database import today.

Related guides: ODBC Alternative for Excel | SQL Server to Excel | Databases in Microsoft Excel

Category: Articles

Tags: import-database-excel, excel-database-connection, pull-data-from-database, live-data, odbc-alternative, power-query, database-integration, sql-server, postgresql, mysql

Meta Description: Import any database into Excel without drivers or DSN. Compare ODBC, Power Query, VBA, and Query Streams for live data.

Updated on June 3, 2026

Powered by BetterDocs