Free

Free coded apps to suit all. No sign up, no email, usable offline, updates when I can, feedback welcome. Send feedback

Workflows

Exporting tables and queries to Excel, CSV and JSON from Base

Export any table or query from Base by Zaweba to CSV, write a real .xlsx with one sheet per table or query, or save records as a JSON array for other tools.

Exporting tables and queries to Excel, CSV and JSON from Base

A database is where records live, but it is rarely the only place they are needed. The accountant wants a spreadsheet. A mailing service wants a CSV. A web project wants JSON. Base by Zaweba exports to all three, from tables and from saved queries, so you can hand over exactly the slice of data someone needs without giving them the whole database.

Exporting a query rather than a table is often the smarter move. Filter, sort and pick columns in the query first, then export it, and the file arrives ready to use.

CSV for anything that reads text

Any table or query can be exported to CSV. It is the plainest format there is, and almost every program can read it: spreadsheets, mailing tools, accounts software and other databases. Use it when the other side has asked for CSV, or when you don't know what they'll open it with.

If the query has parameters, Base asks for the values when you export, just as it does when you run it. That makes a parameter query a neat way to export, say, one town's members or one month's orders without editing the design.

A real Excel workbook

Database > Export to .xlsx writes a proper Excel file rather than a CSV renamed. You choose which tables and queries go in, and each one becomes its own sheet. Dates arrive as Excel dates, so they sort and filter correctly. Money arrives formatted as pounds. Each sheet has its header row frozen and filters switched on, so the person opening it can scroll and narrow down the rows straight away.

That makes it a good way to send a tidy pack of figures. A sheet of this month's invoices, a sheet of unpaid ones and a sheet of totals by customer can all go in one workbook from three saved queries.

JSON for other programs

JSON export writes an array of records. It suits developers, scripts and web projects that want structured data rather than a spreadsheet. Each record becomes one entry in the array, ready for code to loop through.

Choosing what to export

Think about who will use the file and what they need. A spreadsheet for a meeting should have readable column names and no internal ids. A file for another system may need the ids and nothing else. Saved queries let you shape both from the same tables, and because they are saved, next month's export is the same few clicks.

Be careful with personal details. Export only the columns the other person needs, and keep files with names, addresses or phone numbers somewhere sensible. A query that leaves those columns out is the simplest safeguard.

Exports versus the website

An export is a snapshot. The file shows the records as they were when you saved it, and it won't change when the database does. If people need to see live records and add their own, the better route is Base's website export, which gives them pages in a browser instead of a file in an email.

For everything else, from a quick list for the club committee to a year end workbook for the accountant, the export menus cover it. Save the queries you export often and the job takes moments each time.