Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Exporting content as CSV, JSON or XML

How to turn content held in Exponential (registers, lists of service points, directories kept as content objects) into open data files: the xrowextract Export tab and its commands, the kernel's exp:ezcsvexport, and the…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/government/open-data/exporting-content-as-csv-json-xml.md

On this page

Exporting content as CSV, JSON or XML

This page is for administrators and editors whose data already lives in Exponential as content: a list of service points, a register of decisions, a directory of facilities. Instead of keeping a separate spreadsheet, export the content itself as a dataset file. The tools are the xrowextract extension (xrowextract) and the kernel command exp:ezcsvexport.

Contents

  1. Which tool
  2. The Export tab of xrowextract
  3. From the command line
  4. The kernel command exp:ezcsvexport
  5. Publishing the exported file
  6. Before you publish an export

Which tool

NeedTool
One class to CSV, JSON or XML, with a preview, filters and saved presetsxrowextract, Export > One class of content export
Every class below a node as one archivexrowextract, Multi class of content export
A regular export delivered to a folder, SFTP or S3xrowextract Schedules
A quick CSV per class from the shell, no extensionexp:ezcsvexport
Form submissionsSetup > Collected information, CSV export per form (Collected information)

xrowextract is installed with Exponential but must be active on your site (ActiveExtensions[]); ask your administrator. Its pages need the extension's policies (xrowextract policies).

The Export tab of xrowextract

  1. Open Export in the top menu (/xrowextract/csv), then One class of content export.
  2. Pick the class (for example your service_point class) and the start node.
  3. Choose the format: CSV, JSON or XML. Choose the languages if the content is translated: one row per translation.
  4. Add filters if needed (date, section, state, visibility, attribute values).
  5. Press Preview to see the first rows as a spreadsheet will show them.
  6. Download the file, or save the settings as a preset to repeat the export later.

Large exports can run in the background and be downloaded from the Jobs tab when they are done.

From the command line

# one class below a node, as CSV
php extension/xrowextract/bin/php/csv.php --class=<class identifier> --node=<node id> --output=var/export/service-points.csv

# the same as JSON, visible content only
php extension/xrowextract/bin/php/csv.php --class=<class identifier> --node=<node id> --format=json \
  --visibility=visible --output=var/export/service-points.json

# which columns a class offers
php extension/xrowextract/bin/php/csv.php --list-columns --class=<class identifier>

Schedules (ext:xrowextract:schedule) run exports regularly and can deliver the file to SFTP, FTP/FTPS, a NAS folder, S3, WebDAV or an HTTP endpoint.

The kernel command exp:ezcsvexport

Without the extension, the kernel exports the subtree below a node to one CSV file per content class:

./console exp:ezcsvexport --storage-dir=var/export/csv <node id>
php bin/php/ezcsvexport.php --storage-dir=var/export/csv <node id>

It has no filters and no column choice; review the columns before publishing.

Publishing the exported file

The export is a file on the server or in your downloads. To publish it as open data, upload it as a distribution of the dataset (see "Publishing dataset files"), with the date of the export in the dataset's "Last changed" field. For a regular export, replace the file in the same distribution each time so the page address stays the same.

Before you publish an export

  • To do: Remove columns with personal data: owner, creator, modifier, e-mail addresses, internal notes. Exports can include such columns, and user accounts can be exported as special columns by users with the right policy.
  • To do: Remove internal identifiers re-users do not need, or keep them deliberately as stable keys.
  • To do: Check the character encoding (UTF-8) and the delimiter in a spreadsheet program and a text editor.
  • To do: Check one row against the published page.
  • To do: Record which export (preset or command) made the file, so the next update is the same.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x