Data export

<< Click to Display Table of Contents >>

Navigation:  Reference Manual > Windows and dialog boxes > Data export >

Data export

From the Main window menu [Data] [Export data] is used to output data to a spreadsheet report (Excel / OpenXML or CSV).

For CATI projects you can also export the Current data using the CATI Main window menu.

You can also output a sorted subset of the data to CSV or Excel using Data view window.

This is a wizard that takes you through the four stages:

Data - choose the data file to extract the report from

Filter - choose the records to use in the report

Output - choose the types of output to use in the report

Entries - choose the entries to output

The way the entry data is stored in the exported file is selected using the Export type user control.

When all the relevant sections have been completed the report is displayed in a "Raw CSV file view" window and it can be saved to a file.

The chosen output details can be saved to an Export details XML file and re-loaded for use at a later date with the same or a different data file.  The Export details file can also be used with other projects that use the same entry names which is useful for CATI or CAPI projects to look at ZZZ entries.

Data

This tab appears first and allows you to choose the data file to use with the Data read user control.

If you move to another tab without choosing a data file and there is one preselected then this file will be loaded for you.

This tab also allows you to load and reuse a previously saved Export details file.

NOTE: if  accessed from the CATI menu the current data has already been selected.

Batch export

This cannot currently be used for CATI Current data unless this has first been copied to a data file using the CATI Main window menu.

If you export (not a listing by entry) a raw data file and then save the export details file you can run the export again without intervention in a command file (see Data export):

"...Companion...exe" "...qdf" /export "....xml" >> "....Log"

The export will use the same data file that was used when the export details file was saved.  The output file name will be the same as the data file with " Exported Auto" added to the name.  If you want to preserve the output file you should move or rename it in the command file.

The export will run without any interaction so it is important to send the output to a log file in case there is a problem.  Here is an example of a BAT file:

echo Running MyData.asc export > "Export.Log"

del "MyData Exported Auto.CSV"

"location of Companion program" "MyProject.qdf" /export "MyExport.xml" >> "Export.Log"

The location for ClickOnce installs is "C:\Users\yourname\Desktop\QPSMR Companion.appref-ms"

Filter

This tab allows you to select a subset of the records to output with a filter defined with a Logic definition user control.

Output

This tab has the overall output type settings:

The type of output can be:

Excel / OpenXML spreadsheet file

CSV view

and can be:

Readable output for loading into a spreadsheet program

QPSMR portable output to make a CSV file

Listing by entry (CSV only)

These overall settings set all the relevant options in the Export type user control which also appears on this tab.  The user control can then be used to change any of the options if required.

IMPORTANT: If an entry is filtered for a record then the output cells will be left blank.

TIP: See also the [Project] [Output response texts to file] from the Main window menu.

Readable and QPSMR portable

These produce a row for each record with columns for each entry to be exported.

You can also request that question texts are output as the second row (between the headers and the data).  This extra row will need to be deleted before using as a data file.  If individual columns are allocated for responses and the output is not readable then the relevant response text is added to the question text.

Listing by entry

This is also referred to as "Stacked data".

This produces a row for every entry to be exported containing: serial number, entry number, entry text (if requested), response value, response text.

Only entries with valid response values are exported.

This can produce a very large file so it is not opened automatically after it has been produced.

Entries

This tab is used to choose the entries to be exported:

All relevant entries in the project (default)

Only the relevant entries selected on the Main window

Selected entries on the Main window can also be added to the existing list

The word relevant above means that only entry types requested in the Export type user control will be included in the list when it is replaced.  You can "Add main window selected" entries even if they have a type that has not been requested.

A list of entries to be exported is shown.

You can select entries on this list to change the way they are output:

You can remove selected entries so that they are not exported

You can move entries up or down the list so that they are output in a different order

You can change way selected multi-coded entries are output, see Export type user control for details:

oSingle (single column)

oEvery (every response has its own column)

oSpread (spreadfield output)

You can choose whether entries with response lists (single or multi) will be output as values or text