我如何连接乳胶和excel到postgres?

是否有可能从Excel中运行postgres查询,并获得在Excel中的结果?

是否有可能从乳胶运行postgres查询,并得到的查询结果?

乳胶的答案:我能够直接在乳胶中的postgres查询结果与此链接http://hgesser.com/software/latexdb/

您可以通过ODBC驱动程序从Excel连接到Postgres。 过程与文章中描述的MySQL类似。 如何传输某些查询的结果的第二种通用​​可能性是导出为CSV格式的文件并导入到Excel中。 这很简单,通常完​​美的作品。

 [pavel @ localhost〜] $ psql postgres
 psql(9.1.9,服务器9.4devel)
警告:psql版本9.1,服务器版本9.4。
         一些psqlfunction可能无法正常工作。
input“help”寻求帮助。

 postgres =#\ copy(SELECT * FROM pg_database)TO〜/ data.csv CSV HEADER
 postgres =#\ q
 [pavel @ localhost〜] $ tail〜/ data.csv 
 datname,datdba,编码,datcollat​​e,datctype,datistemplate,datallowconn,datconnlimit,datlastsysoid,datfrozenxid,datminmxid,dattablespace,datacl
 template1,10,6,是en_US.UTF-8,是en_US.UTF-8,T,T,-1,12948,1879,1,1663, “{= C / postgres的,postgres的= CTC / postgres的}”
 template0,10,6,是en_US.UTF-8,是en_US.UTF-8,T,F,-1,12948,1879,1,1663, “{= C / postgres的,postgres的= CTC / postgres的}”
 postgres的,10,6,是en_US.UTF-8,是en_US.UTF-8,F,T,-1,12948,1879,1,1663,

您可以使用乳胶的相同机制http://texblog.org/2012/05/30/generate-latex-tables-from-csv-files-excel/