This topic is under construction for the 17.1 release of LabKey Server. For current documentation of this feature, click here.
LabKey provides a variety of methods for exporting the rows of a data grid
. You can export into formats that can be consumed by external applications (e.g., Excel) or into scripts that can regenerate the data grid. You can also choose whether to export the entire set of data or only selected rows
Your choice of export format determines whether you get a static snapshot of the data, or a dynamic reflection that updates as the data changes. The Excel and TSV formats supply static snapshots, while scripts allow you to display dynamically updated data.
You can export data in a grid view to an Excel file, a TSV text file, an Excel Web Query, or a variety of different scripts, which can recreate the data grid. Click the Export
button above any grid view and use the left-hand tabs to choose between Excel, Text and Script
exports, each of which carries a number of appropriate options.
After selecting your options, decribed below, and clicking the Export
button, you will briefly see visual feedback that the export is in progress:
Export Column Headers
Both Excel and Text exports allow you to choose whether Column Headers
are exported with the data, and if so, what format is used. Options:
- None: Simply export the data table with no column headers.
- Caption: (Default) Include a column header row using the currently displayed column captions as headers.
- Field Key: Use the column name with FieldKey encoding. While less display friendly, these keys are unambiguous and canonical and will ensure clean export and import of data into the same dataset.
Export Selected Rows
If you select one or more rows using the checkboxes on the left, you will activate the Export Selected Rows
checkbox. When selected, your exported Excel file will only include the selected rows. Uncheck the box to export all rows. For additional information about selecting rows, see Select Rows
Filter Data Before Export
Another way to export a subset of data records is to filter the grid view before you export it.
- Filter Data. Clicking a column header in a grid will open a dialog box that lets you filter and exclude certain types of data.
- Create or select a Custom Grid View. Custom Grids let you store a selected subset as a named grid view.
- View Data From One Visit. You can use the Study Navigator to view the grid of data records for a particular visit for a particular dataset. From the Study Navigator, click on the number at the intersection of the desired visit column and dataset row.
Export to Excel
When you export your data grid to Excel, you can use features within that software to access, sort and present the data as required. If your data grid includes inline images
they will be exported in the cell in which they appear in the grid.
Export to Text
tab to export the data grid in a text format. Select tab, comma, colon, or semicolon from the Separator
pulldown and single or double from the Quote
pulldown. The extension of your exported text file will correspond to the separator you have selected.
Export to Script
You can export the current grid to script code that can be used to access the data from any of the supported client libraries. See Export Data Grid as a Script
The option to generate a Stable URL
for the grid is also included on the Export > Script