soggers
soggers

Reputation: 1

Exception in npgsql 3.2.0 connecting to PostgreSQL via Excel PowerQuery

I have a PostgreSQL 9.6.1 database from which I want to extract data for use in Excel with Get & Transform (PowerQuery). I have 64-bit Excel 2016 Pro Plus running on Windows 10 64-bit with .NET framework 4.6 installed.

When I try to use "Data->New Query -> From Database -> From PostgreSQL Database", I put the server name (localhost) and DB name into the dialog box.

I then get the error message,

An error happened while reading data from the provider: 'The type initializer for 'Npgsql.Counters' threw an exception.'

I have the following setup:

Could anyone help me understand if I did anything wrong?

Upvotes: 0

Views: 790

Answers (1)

Carl Walsh
Carl Walsh

Reputation: 6979

It looks like this is an issue with a recent npgsql release? Until that's fixed, if you install version 3.1 or 3.0 Power Query should work :)

One other thing you could try is using net45. We officially support .NET 4.5.1 but sometimes you have more luck with older releases.

Upvotes: 1

Related Questions