Download This Chapter

Import Data from Excel and SPSS

There are several situations in which you might want to import document variables into MAXQDA, such as:

  • If you want to analyze responses to open-ended questions in combination with the quantitative socio-demographic information that you acquired for each of those who filled out the survey. Usually, you will already have this quantitative data in a matrix of some sort, and re-entering that information into MAXQDA would just cause you unnecessary work.
  • If you did statistical analysis on material that you exported from MAXQDA and now want to reimport the results of your statistical analysis into MAXQDA. You could, for example, have done a cluster analysis for 40 interviews and now want to import the cluster assignments from each individual interview.

Importing document variables from Excel

MAXQDA can import data from XLS/X files. The data must be organized as follows:

Document groupDocument nameVariable 1...Variable N
Group 1Text 1Variable value for Text 1 Variable value for Text 1
Group 1Picture 1Variable value for Picture 1 Variable value for Picture 1

The first two column headers serve as markers for assigning variable values to the documents and are required for successful import. Every row must have an entry for the document group and document name columns. Only if these exact group and document names are found in the “Document System” of the MAXQDA project, will the variables and variable values be imported. You can then include as many different variable columns as you wish.

After preparing and saving the document, you can start the import procedure by going to Variables > Import Document Variables. Alternatively, you can click on the Import data (document variables) symbol in the “List of document variables.”

A dialog field appears in which you can specify the source and target variables along with the type of variables to be imported.

MAXQDA does the following during the import:

  • All variables in the import file that did not yet exist in the MAXQDA project are created.
  • Variables that already existed will be updated with the new values in the import file.
  • Empty values (“system missings”) for variable types integer and floating point will be imported as -999.
Tip: An easy way to set up an Excel file for importing new values is to first export the variable data matrix as an Excel file by clicking on the Excel icon in the toolbar of the variable list. An Excel file with all of the current variables will open up, and you can then add new columns for new variables and update variable values that you want changed. All you have to do after that is save the Excel file and import it into MAXQDA.

Importing document variables from SPSS

You can also import a data matrix for the document variables from a SPSS data file (extension SAV). For the import MAXQDA needs to match the cases oft he SPSS data file with the document names in the opened MAXQDA project. Therefor it is necessary, that the data file contains a variable (a column) for the document group as well as a variable for the document name.

  1. Please start the import procedure by going to Variables > Import Document Variables. Alternatively, you can click on the Import data (document variables) symbol in the List of Document Variables.
  2. Then choose a SPSS data file in the appearing file dialog.
  3. A new dialog will appear, that allows you to set several options:
Options for importing a SPSS data file

In the upper part you can select which variables (= columns) contain the information about the document group and the document name to match the cases with the appropiate document name. MAXQDA will choose the first two columns of the SPSS data file, if the data file doesn’t contain variables that are labelled with “DocGroup” and “DocName.” You will find the variable labels in brackets behind the variable names for better navigation in the list of variables.

Furthermore, you can switch on two additional options:

Import variable label instead of variable name – If you choose this option, MAXQDA won’t import the variable names, but their labels, which are usually longer and easier to read and to understand. You should use this option, if you want to import a SPSS data file that has been created by exporting the document variables from MAXQDA. Then it will be easy to update a variable which values have been changed in SPSS. Please note that the length of variable names in MAXQDA is limited to 63 characters, so a longer name may be truncated.

Import value labels instead of values – usually, standardized answers will be represented in SPSS by numbers, e.g. a 1 may be used for “female” and a 2 for “male”. If you see these numbers only in MAXQDA without knowing what a “1” and “2” means, it won’t be very useful, so this option should only be deactivated if you are sure you want to import the values instead.

A dialog field appears in which you can specify the source and target variables along with the type of variables to be imported.

MAXQDA does the following during the import:

  • All variables in the import file that did not yet exist in the MAXQDA project are created.
  • Variables that already existed will be updated with the new values in the import file.
  • If you have defined missing values in SPSS only the first missing value (defined in section “Discrete missing values” in the SPSS dialog) will be imported (only for variable types integer and floating).
  • System variables won’t be changed.
  • If the import file contains identical document names in the same document group, the last case will overwrite the previous ones.
  • Empty values (“system missings”) for variable types integer and floating point will be imported as -999.

Importing code variables from Excel

MAXQDA can import data from XLS/X files. The data must be organized as follows:

CodeVariable 1...Variable N
Parent code 1Code 1Variable value for code 1 Variable value for code 1
Parent code 1 Code 2Variable value for code 2 Variable value for subcode 2

The first column heading is the unambiguous assignment of variable values to a code, so this column and its heading are mandatory. Each line must designate a code in the corresponding column. For subcodes, the entire path must be specified in the code system, in which the codes are separated by a backslash.

Tip: To insert a backslash “\” on a Mac, use the keyboard command option+⇧+7.

Only when a code, which matches this information exactly, is found in the “Code System” will the variable be imported. You can add as many variables as required in the subsequent columns.

After preparing and saving the import data, you can then start the import procedure by going to Variables > Import Code Variables. Alternatively, you can click on the Import data (code variables) button in the List of Code Variables.

A dialog field appears in which you can specify the source and target variables along with the type of variables to be imported.

MAXQDA does the following during the import:

  1. All variables in the import file that did not yet exist in the MAXQDA project are created.
  2. Variables that already existed will be updated with the new values in the import file.
Tip: An easy way to set up an Excel file for importing new values is to first export the variable data matrix as an Excel file by clicking on the Excel icon in the toolbar of the variable list. An Excel file with all of the current variables will open up, and you can then add new columns for new variables and update variable values that you want changed. All you have to do after that is save the Excel file and import it into MAXQDA.

Was this article helpful?