Hi Naveen,
> On 13. Aug, 2020, at 16:10, Naveen Kumar wrote:
>
> How to export query results to excel file using psql command in postgresql
use the "copy" command along with its CSV output setting. Then open the CSV
file with Excel.
Look here:
https://www.postgresqltutorial.com/export-postgr
Hi
čt 13. 8. 2020 v 16:10 odesílatel Naveen Kumar napsal:
> How to export query results to excel file using psql command in postgresql
>
Excel can import csv file
so you can
for Postgres 12
\pset format csv
\o path_to_file
select * from ...
or for older postgres
\copy (select * from ...) t
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.kla...@aklaver.com