Video: Export data from PostgreSQL table to Excel file in a few clicks
This video shows how to export data from PostgreSQL table to Excel file in a few clicks with Withdata DBToFile, or with the free Export PostgreSQL to Excel online tool. It covers the postgres table side and the Excel side.
Export PostgreSQL to Excel: what this does
This shows how to export a PostgreSQL table (or a query result) into an Excel workbook — handy when the people who need the data work in a spreadsheet rather than a database client. The video above is the full flow; the notes cover the PostgreSQL-to-Excel specifics.
Steps
Open Withdata DBToFile and connect to PostgreSQL (host, port, database, user).
Select the table, or use Query to export a filtered or joined result.
Choose Excel as the destination format.
Pick the output file and click Export. Each table or query can go to its own worksheet.
Save the session to repeat the export on a schedule.
PostgreSQL to Excel: details worth knowing
Dates. A timestamp/timestamptz is written as a spreadsheet date/time; set the column format explicitly or Excel may show a serial number.
Numbers and precision.numeric/decimal keep their precision in the cell; bigint values above 2^53 can lose precision if a reader treats them as doubles.
Booleans. A PostgreSQL boolean becomes TRUE/FALSE in the cell.
Binary and rich types.bytea, arrays and jsonb have no spreadsheet equivalent — they are written as text, so flatten them with a query first if you need separate columns.
Size limits. A worksheet holds 1,048,576 rows and a workbook up to 255 sheets, so very large tables should be split by table, date range or row count.
FAQ
Can I export several tables into one workbook?
Yes — one worksheet per table or query.
Will accents and non-Latin text survive?
Yes; the workbook is written as UTF-8 so Excel shows the text correctly.
Can this run unattended?
Yes — save the session and trigger it from the command line or a scheduled task.