postgresql 将 Excel 2016 连接到 Postgres
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40799032/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Connecting Excel 2016 to Postgres
提问by Andrzej R
I am trying to have Postgres show as one of the data connection in Excel 2016. Following MS Office instructionsI installed Ngpsql data provider. I used msi for installation so according to the instructions provided in the wizard the dlls were registered in GAC and the provider was registered in machine.config (I checked - the entry is there). Yet Postgres is still not showing as an option in Excel > Data > New Query > From Database list. Searching the web shows old out of date discussions. Developers of of Ngpsql direct questions to Stack Overflow. So please help.
我试图让 Postgres 显示为 Excel 2016 中的数据连接之一。按照MS Office 说明,我安装了 Ngpsql 数据提供程序。我使用 msi 进行安装,因此根据向导中提供的说明,dll 在 GAC 中注册,提供程序在 machine.config 中注册(我检查了 - 条目在那里)。然而 Postgres 仍然没有在 Excel > Data > New Query > From Database 列表中显示为一个选项。搜索网络显示过时的旧讨论。Ngpsql 的开发人员直接向 Stack Overflow 提问。所以请帮忙。
回答by Logan Greenlee
Postgres data can be used in Excel 2016 but it requires the ODBC driver and an external setup of the database server. As far as I can tell the Npgsql drivers do not work with my version of Excel which is 2016 MSO 32-bit a.k.a "Home Premium".
Postgres 数据可以在 Excel 2016 中使用,但它需要 ODBC 驱动程序和数据库服务器的外部设置。据我所知,Npgsql 驱动程序不适用于我的 Excel 版本,即 2016 MSO 32 位,又名“家庭高级版”。
The Postgres ODBC driver is available here: https://www.postgresql.org/ftp/odbc/versions/msi/Download and install the latest version. It should install without needing a system reboot.
Postgres ODBC 驱动程序可从此处获得:https: //www.postgresql.org/ftp/odbc/versions/msi/下载并安装最新版本。它应该无需重新启动系统即可安装。
Setup a DSN (I used machine) using the ODBC Data Sources (XX-bit) setup application. The driver version needs to match your Excel version.
使用 ODBC 数据源(XX 位)设置应用程序设置 DSN(我使用过的机器)。驱动程序版本需要与您的 Excel 版本匹配。
After testing the connection in the setup screen, open Excel 2016 and use the Data -> New Query -> From Other Sources -> From ODBC menu to open the query screens. This seems to be the most modern interface available in Excel.
在设置屏幕中测试连接后,打开 Excel 2016 并使用数据 -> 新建查询 -> 从其他来源 -> 从 ODBC 菜单打开查询屏幕。这似乎是 Excel 中可用的最现代的界面。