pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Naveen Kumar <naveenmcp@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: How to export query results to excel file using psql command in postgresql
Date: Thu, 13 Aug 2020 07:15:38 -0700
Message-ID: <6d4ea5f4-309f-64d4-eb2c-daa7ac25ab19@aklaver.com> (raw)
In-Reply-To: <CAN+uLsGivA_mG0vX=qos0JZEsqA9yqkmAxDkV_TjuVXXJ6CvXg@mail.gmail.com>
References: <CAN+uLsGivA_mG0vX=qos0JZEsqA9yqkmAxDkV_TjuVXXJ6CvXg@mail.gmail.com>

On 8/13/20 7:10 AM, Naveen Kumar wrote:
> How to export query results to excel file using psql command in postgresql

You can't. You can export to CSV that you could then import into Excel.

See:

https://www.postgresql.org/docs/12/app-psql.html

\copy


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (4+ messages)

Message-ID: <6d4ea5f4-309f-64d4-eb2c-daa7ac25ab19@aklaver.com>
Permalink:  ../6d4ea5f4-309f-64d4-eb2c-daa7ac25ab19@aklaver.com/
Also on:    postgresql.org/message-id/6d4ea5f4-309f-64d4-eb2c-daa7ac25ab19@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, naveenmcp@gmail.com
  Subject: Re: How to export query results to excel file using psql command in postgresql
  In-Reply-To: <6d4ea5f4-309f-64d4-eb2c-daa7ac25ab19@aklaver.com>
  References: <CAN+uLsGivA_mG0vX=qos0JZEsqA9yqkmAxDkV_TjuVXXJ6CvXg@mail.gmail.com> <6d4ea5f4-309f-64d4-eb2c-daa7ac25ab19@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox