PostgreSQL to Excel
Send PostgreSQL data to Excel automatically
PostgreSQL
- Mammoth
Excel
Order ID Customer Status Total 50213 Pine & Co Shipped $412.00 50214 Delta Supply Pending $1,080.00 50215 Marlow Cafe Shipped $96.50 50216 Pine & Co Refunded $58.00
Shown on sample data.
Set up PostgreSQL to Excel in three steps
- Step 1
Connect PostgreSQL
Enter your server's host, port, database and a user with read access. An SSH bastion host works too.
- TablesViewsYour SQLStep 2
Pick your fields
Pick a table, or write your own SQL. Mammoth shows the rows before you save.
Updated
Step 3Send it to Excel
Email the Excel file after every update, or connect Excel to a Live link.
Choose how Excel updates
Your PostgreSQL data refreshes every day, or only when you ask. You can set a different schedule.
| Order ID | Customer | Status | Total |
|---|---|---|---|
| 50213 | Pine & Co | Shipped | $412.00 |
| 50214 | Delta Supply | Pending | $1,080.00 |
| 50215 | Marlow Cafe | Shipped | $96.50 |
Sends a new Excel file after every update.
Best for people who want the file in their inbox.
| Order ID | Customer | Status | Total |
|---|---|---|---|
| 50213 | Pine & Co | Shipped | $412.00 |
| 50214 | Delta Supply | Pending | $1,080.00 |
| 50215 | Marlow Cafe | Shipped | $96.50 |
Excel refreshes from a fixed web address.
Best for a workbook you keep and refresh.
Emails go to up to 50 people in your workspace. Files over 10 MB arrive as a download link.
Clean and combine your PostgreSQL data first
Mammoth gets the data ready before it goes to Excel.
Add your other data
Join PostgreSQL with HubSpot, Xero, Salesforce or 100+ other sources.
Fix the data first
Remove duplicates, fill blanks and fix formats. The same fixes run every time.
Lifetime value = Sum of Total by CustomerAdd the columns you need
Work out lifetime value, order count or month so they arrive ready to use.
What teams use PostgreSQL in Excel for
Weekly operations file
Orders by status, in the team's inbox every Monday.
Finance workbook
Revenue by customer and month, refreshed in Excel.
Reports for people without database access
The numbers they need, without a login to the database.
Ways to get PostgreSQL data into Excel
How to export PostgreSQL data to Excel by hand
- 1Open psql and connect to your database.
- 2Run \copy (SELECT * FROM orders) TO 'orders.csv' WITH CSV HEADER.
- 3In Excel, choose Data, then From Text/CSV, pick the file and click Load.
\copy writes the file on your own computer and needs no superuser rights. COPY ... TO writes it on the server instead.
You repeat these steps for every update, and any cleaning is done again by hand. Mammoth does it on a schedule.
Mammoth
For PostgreSQL data in Excel, cleaned and emailed on a schedule.
- ✓Clean the data before it reaches Excel
- ✓Join CRM or accounting data
- ✓Send the file to people without database access
- ✓Send the same data to Google Sheets or Power BI
- ✕No extra tool between the database and Excel
Excel's own PostgreSQL connector
For people who can reach the database from Excel.
- ~Clean the data before it reaches ExcelIn Power Query
- ~Join CRM or accounting dataIn Power Query
- ✕Send the file to people without database access
- ✕Send the same data to Google Sheets or Power BI
- ✓No extra tool between the database and Excel
Common questions about PostgreSQL to Excel
How do I connect PostgreSQL to Excel?
Does Excel update automatically?
Can I limit how often the email sends?
How do I connect Excel to a Live link?
What access does Mammoth need in PostgreSQL?
Step-by-step setup is in our docs for PostgreSQL and Excel.
Keep Excel up to date with PostgreSQL data.
Start free, connect PostgreSQL, and send it to Excel.
- ✓ 14-day Pro trial
- ✓ No credit card
- ✓ Viewers always free