Re: exporting query result

From: Günce Kaya <guncekaya14(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-admin(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: exporting query result
Date: 2017-05-12 16:20:06
Message-ID: CAAV2-mV3y54UXMRCg0WTeG_LtRP9pBk-r-qY2zD4vn_yFwnKtw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

Hi again,

Thank you for your advice. It's more clear now. I'll look at this link.

Regards,

Gunce Kaya

On Fri, 12 May 2017 at 19:07, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 05/12/2017 08:58 AM, Günce Kaya wrote:
> > Hello,
> >
> > Thank you for your advice. But I did not want to ask about using Copy. I
> > always use it but my requirement is if there is anyway to export query
> > result to CSV's different sheets.
>
> CSV != spreadsheet. You can export to CSV using COPY or \copy in psql
> and then import those into a spreadsheet. If you want something that
> creates an xls(x) file directly then that is going to require a third
> party software. I use Python for doing stuff like that. Some programs I
> use are:
>
> Pandas
> http://pandas.pydata.org/pandas-docs/stable/io.html
>
> XlsxWriter
> http://xlsxwriter.readthedocs.io/
>
> csvkit
> http://csvkit.readthedocs.io/en/1.0.2/
>
> FYI, csvkit is a collection of command line tools, so it just needs
> Python to be installed.
>
> >
> > Regards,
> > Gunce Kaya
> >
> >
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>
--
Gunce Kaya

Linkedin <https://tr.linkedin.com/in/guncekaya> - Twitter
<https://twitter.com/gguncesi> - Blog
<http://www.guncekaya.blogspot.com.tr/>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Thomas Kellerer 2017-05-12 16:21:08 Re: exporting query result
Previous Message Adrian Klaver 2017-05-12 16:07:19 Re: [SQL] exporting query result

Browse pgsql-sql by date

  From Date Subject
Next Message Thomas Kellerer 2017-05-12 16:21:08 Re: exporting query result
Previous Message Adrian Klaver 2017-05-12 16:07:19 Re: [SQL] exporting query result