Skip to content

XNAT data tables and spreadsheet export§

Advanced search results and certain XNAT listings are displayed as a Data Table. Data tables have a column for each data field in the metadata. Not all columns are visible by default but you can change this from the table itself. You can also modify the filters to change the search criteria, sort tables by any of the data elements, and export the table data to a spreadsheet file or XML. See the XNAT documentation How to Edit, Filter, and Join Data Tables for examples on how to sort and filter data tables.

XNAT data table

Sort the table view§

Click on the column name and choose Sort Up or Sort Down

Sort XNAT data table

Filtering§

Filters modify your search criteria. You can add one or more filters to any data field to show only data that matches the required values. Filtering supports more advanced comparisons for appropriate data types (eg >, < for numbers, pattern matching for strings, etc).

To add or delete a filter:

  • Click on the column name for the data field you want to filter. Choose Filter from the menu.

Filter XNAT data table

  • Choose the type of comparison, for example:
  • = to exactly match a value
  • BETWEEN searches for values between two numbers.
  • LIKE to match a value to a SQL pattern, e.g. S% will match all entries beginning with S
  • IS NULL checks for values that have not been set
  • Specify the value or pattern to match. For BETWEEN separate values with AND, i.e. 5 AND 7
  • If you want to add further filters on this data field, click More...
  • To delete a filter, click the red bin icon next to the filter
  • Click Submit

Hide a data column§

Click on the column name and choose Hide Column

Show other data columns§

  • Click Options > Edit Columns

XNAT edit columns

  • To show a data field column, click on the field in Available Fields and click the left arrow button to move to Current Fields
  • Click Submit

Export the table as a spreadsheet file (CSV)§

Click Options > Spreadsheet

View the data fields as XML§

Click Options > Show XML

Run a search on another session type and combine results with the current search results table§

You can only add searches on session types that are not already part of the existing search.

  • Click Options > Join to...
  • From New Data Type: select the other session type you want to search.
  • Select Brief or Detailed. Some types only give one option. If both options are available, this determines which data fields will be initially visible in the search results (the fields shown can be changed later).
  • Click Add

XNAT data table join to