Knowledgebase

Exporting Data to CSV or Spreadsheet Print

  • databasesphpmyadmin, databases, guide, howto, solution, zillionkinghost, hosting, support
  • 0

Getting data out in a usable form.

FROM A QUERY

Run a SELECT, then use the export option beneath the results.

Choose CSV for spreadsheets.

FROM A WHOLE TABLE

Select the table, Export tab, choose CSV.

WHAT TO INCLUDE

Only the columns needed. SELECT * produces every column including internal ones nobody wants.

Add a WHERE clause to restrict to the relevant rows: a date range, a status.

FORMATTING

Choose to include column names in the first row, which makes the spreadsheet usable.

Check the separator suits your spreadsheet software.

ENCODING

Export as UTF-8. Opening a UTF-8 CSV in some spreadsheet software mangles accented characters unless imported rather than opened directly.

THE PRIVACY POINT

A customer export is personal data. Do not leave it on the server, and delete it when finished.

Never place it in a web-reachable folder.

THE EASIER ROUTE

Most applications have export built in and handle relationships properly. Try that first.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot