Connect to a PostgreSQL database (Power Query)

Use Excel's Get & Transform (Power Query) experience to connect to a PostgreSQL Database, which is an open source object-relational database system.

Note: Before you can connect to a PostgreSQL database in Power Query, you need the Ngpsql data provider for PostgreSQL installed on your computer. Select the driver that matches your Office version (32-bit or 64-bit). See: Which version of Office am I using? for more information. Also make sure you have the provider registered in the machine configuration that matches the most recent .NET version on your device.

Click the Data tab, then Get Data > From Database > From PostgreSQL Database. If you don't see the Get Data button, then click on New Query > From Database > From PostgreSQL Database.

In the Power Query ribbon tab, select From Database > From PostgreSQL Database.

Power Query From Database options

Next

  1. In the PostgreSQL Database dialog box, specify the PostgreSQL Database Server you want to connect to in the Server Name section.

  2. If you want to import data using native database query, specify your query in the SQL Statement box. For more information, see Import Data from Database using Native Database Query.

  3. Select OK.

  4. If the PostgreSQL server requires database user credentials:

    1. In the Access a Database dialog box, enter your username and password.

    2. Select Connect.

Need more help?

You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.

See Also

Get & Transform in Excel 2016

Import data from external data sources

Expand your skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×