Overview for importing and exporting data

Survey data can be

  • exported from Snap Desktop for use in other surveys or other packages
  • imported into Snap Desktop from other surveys or other packages

Common uses of exporting and importing data are:

  • exporting data from one Snap survey into another to merge a number of surveys
  • exporting or importing data between other applications such as a spreadsheet or database
  • exporting literal response data to a word processor application

There are a number of ways to export and import data in Snap Desktop

  • Database Link Wizard
  • Data Import window
  • Data Export window

Snap Desktop has the facility to import and export data, variables and codes between surveys. The easiest way to do this is using a database link to import or export the data. The Database Link Wizard provides the following import and export options:

  • Import from a database
  • Export to a database
  • Import from a Snap survey
  • Export to a Snap survey

In the Database Linkage Wizard you are guided through the process and you can choose settings to select the data required and to match the variables and codes that are not identical.

To open the Database Linkage Wizard

  1. From the Survey Overview window, open the survey that you want to add data to.
  2. On the Snap toolbar click Database Links DBLinksIcon.png to open the Database Links dialog.
DBLinksDlg.PNG
  1. Click New to open the Database Linkage Wizard.
  2. Select the required import or export option and click Next.
  3. Information on each page of the Database Linkage Wizard guides you through the process of creating a new database link Further details for each option can be found at:

The database link can also automatically import and export information as data is entered using a Hot Link.

Using the Import and Export dialogs

These windows are used to

  • Import from the clipboard
  • Import from a file
  • Export to the clipboard
  • Export to a file

Common formats are

  • Comma separated (CSV)
  • Tab separated (TSV)
  • Excel (CSV)
  • Plain text (TXT) for exporting data only
  • Database link which opens the Database Linkage Wizard at the import or export stage

Further information can be found at

Import dialog

There are different versions of the import dialog that are used for importing data, variables, weights, styles, tables and charts to Snap Desktop. Different options are available depending on the type of import.

10: Data import dialog

Format

Select the data format that is appropriate to your import.

Data Import includes

Excel (CSV) is a version of the comma separated format that is easily recognised by Excel files.

Comma separated (CSV) contains a series of fields, each separated by a comma. Text fields are surrounded by quote characters.

Tab separated (TSV) contains a series of fields each separated by a tab.

Other formats are available when importing other items including the Snap Desktop format is used in other import dialogs

Snap Interchange format (SnIF) is a format for transporting all types of data between Snap surveys.

File Clipboard

Select radio button to specify source of file

File:

Name of the data file. Use the Browse button to select it.

Options

 

Code Labels

Check to substitute code labels for numbers in the data.

Label Row

Check if there is an additional row of variable labels under the initial variable names row in the spreadsheet.

Encoding

Specify the byte format for different file types. Use Automatic unless you have specific requirements.

Generate new variable names

Re-number the imported variables to the next available question number in the survey (Variables only)

Generate new variable positions

Changes the source of the imported variables to the next available positions in the data file (Variables only)

Export dialog

There are different versions of the import dialog that are used for importing data, variables, weights, styles, tables and charts to Snap Desktop. Different options are available depending on the type of import.

DataExport.PNG

Format

Select the data format appropriate to the software receiving the data. For example:

Excel (CSV) is a version of the comma separated format that is easily recognised by Excel files.

Comma separated (CSV) comprises a series of fields, each separated by a comma. Text fields are surrounded by quote characters. Use this to export to spreadsheets.

Tab separated (TSV) comprises a series of fields each separated by a tab.

Windows Bitmap (BMP) gives a pixel-based graphic (analyses only)

Windows Metafile (WMF) gives a vector-based graphic (analyses only).

Snap Interchange format (SnIF) is a format for transporting all types of data between Snap surveys.

File

Name of the data file. Use the Browse button to select it.

Overwrite

Overwrite existing file of that name with the new data

Append

Add the new data onto the end of the existing file, keeping any previous data

Clipboard

Select to save data to clipboard

Filter

Select the items (case data, variables etc.) that are to be exported using a standard filter expression

Content

The data to be exported

Encoding

Specify the byte format for different file types. Use Automatic unless you have specific requirements. Automatic will save all files except HTML and XML_SSS as Unicode.

Options

 

Multiples Expanded

Check if data for Multiple Response variables will be created as one column per answer rather than one column per question.

Code Labels

Check to substitute code labels for numbers in the data

Label Row

Check if there is an additional row of variable labels under the initial variable names row in the spreadsheet.

Use 0 as NR

Substitute 0 as the response for questions where no response has been given

Responses Only

Do not export derived variables

Include description

Only available for analyses CSV and TSV files. Includes the information specified in the Data report dialog.

Include source variables

Only available for variables. Export variables associated with those in Filter field. For example, export variables used to build derived variables

Possible value for Contents field

Content

Example

Description

A list of variable names

Q4a ~ Q6

A list of data for the variables will be reported for each case. If reporting on Multiple Response variables, the output is dependent on the output type. It will either be the expanded code labels or a sequence of 1s and 0s. A 1 indicates that the corresponding code was selected; a 0 indicates that it was not selected.

CASE

CASE, Q7

The case number (example shows case number followed by response to Q7)

A raw data specification

RAW(1 to 104)

The raw data from source position 1 to source position 104 will be reported for each case that meets the Filter Specification.

A string constant

‘ABC’

This option is used for inserting information in each case, for example when splitting hierarchical data or defining one wave of a survey.

A number or numeric formula

6+3*Q5

For each case the result of the formula will be reported. This would usually be used for Quantity Response variables.

A logical formula

Q2=1

Will report Y for each case where Q2=1 is true and N where it is false.

Individual items

Q2,Q8:Q9,Q10

This may be a variable list or an axis formula.
The items must be separated by THEN (or ,) depending on the export type.
Using THEN will cause a blank to be printed to separate columns of output. This example would report Q2, followed by a space, then Q8 and Q9 next to each other, followed by a space and finally Q10.

Contents