Hi
čt 13. 8. 2020 v 16:10 odesílatel Naveen Kumar <naveenmcp@xxxxxxxxx> 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 ...) to path_to_file CSV HEADER
Regards
Pavel