1.注册pgoledb.dll文件
下载软件:pgoledb.msi,下载地址:http://download.csdn.net/detail/zhoushengchao/6456945
下载软件:pgoledb.msi,下载地址:http://download.csdn.net/detail/zhoushengchao/6456945
2.打开excel vba 代码窗口,使用如下连接字符串即可
Provider=PostgreSQL OLE DB Provider;Data Source=192.168.1.188;location=postgres;User ID=postgres;password=cdsafe;
3.需要开通postgresql的远程访问功能
参考:http://blog.csdn.net/zhoushengchao/article/details/13093143