Importing Text from a Table/Spreadsheet (e.g. Answers to Open Questions)

With MAXQDA you can import structured documents from an Excel spreadsheet in XLS/S format, during which individual table cells will be automatically coded. In addition, variable values can be assigned to the individual texts. This is particularly useful when importing (online) surveys with standardized and open answers.

How must the Excel table be structured?

When imported into MAXQDA, each row of the table becomes a new document, wherein the contents of the cells form the document content and are coded with the respective column header. The structure of the Excel table corresponds to the principle of a data matrix of a standardized survey. This logic is illustrated in the table below:

Document Group

Document Name

Question 1

Question 2

$Variable

Document Group A

Person 1

Answer to question 1

Answer to question 2

Variable value

Document Group A

Person 2

Answer to question 1

Answer to question 2

Variable value

Document Group B

Person 3

Answer to question 1

Answer to question 2

Variable value

Document Group B

Person 4

Answer to question 1

Answer to question 2

Variable value

Each row of the table contains a case, and the columns "Question 1" and "Question 2" contain the respondent’s responses to the respective questions. The column "$Variable” contains additional variable values ​​for each case. Of particular importance are the first two columns "Document group" and "Document Name", which assign the individual rows of the table to documents in MAXQDA’s “Document System”.

Note: It is not absolutely necessary to have a column for the “Document Group” as MAXQDA can also create a new document group, into which all documents are imported, during the import process. However, at least one column is required, which contains the document name.

Starting the Import

To import the Excel file, proceed as follows:

  • Select the menu function Documents > Import documents from Excel spreadsheet

or

  • select the same option from the context menu of the “Document System”.

Setting Import Options

After calling up the function, the desired Excel file must be selected from the file dialog box. This opens a window where you can enter the settings for the import.

Settings for importing documents from an Excel spreadsheet

The two top settings determine which columns contain the Document Group and the Document Name. If the names "Document group" and "Document Name" are used in your table as column headings, MAXQDA will automatically select them, but this choice can be changed at any time.

If you select [Create new document group] for the entry "Document group", MAXQDA will automatically import all documents into a new document group. MAXQDA automatically selects this option, if your table doesn’t contain a column with the heading “Document Group”.

Tip: When importing answers to open questions, it is recommended that you select the ID’s of the respondents as a column for the document names. In this way, you can avoid any ambiguity in the association of responses to cases, even during the subsequent export of data into statistical software.

In the middle section you can select the columns to be imported as coded text or as variables.

Tip: By default, columns whose heading begins with a "$" will be imported as variables and all other columns except the Document Group and Document Name will be imported as coded text.

If both “Code” and “Variable” are selected, MAXQDA will import the contents of this column as both as coded text and as a variable. This may be useful, for example, you do not wish to view the variable information of a document each time as a tooltip over a document name or in the Data Editor for document variables, but rather view, for example, how old a respondent is and whether he has children, directly in the text.

If neither “Code” nor “Variable” are selected, MAXQDA will ignore the column during the import process.

In the lower section, further options are available:

Code empty cells: When this option is selected, MAXQDA will import and code cells without content as empty paragraphs; these cells would otherwise not be coded.

You can also decide how MAXQDA should handle documents that were already included in the project before the import. MAXQDA considers that a document already exists in the project if the document name and document group are identical.

Import: When this option is selected, existing documents will be included in the import, and therefore may appear twice in the respective document group.

Ignore for import: Select this option if documents that already exist in the project should not be taken into account during the import.

Add text to existing documents: It is also possible to add text to existing documents. For example, data from different points in time in a longitudinal study can be added to the original document. Existing variable entries in existing documents will be updated. Empty variable values ​​in the Excel table are ignored when importing.

Note: For documents whose name appears repeatedly in a document group, the text will be added to the first document of the same name.

Setting other options for the import of variables

If you choose to import variables, a second window will open after you click OK.

Source: By selecting this option, you can again decide which variables will be imported.

Target: If there is already a document variable with the same name in the project, MAXQDA assigns the variable to it automatically and no other choice is available. If there is no variable with the same name in the project, you can specify the type of variable. Options include: Boolean (true/false), date/time, floating-point number, integer, and text.

Preview data type: This column displays a preview of how an entry will appear in the appropriate column in the data editor.

A final report window confirms the import of documents from the table and lists how many texts, codes, and variables were imported, as well as how many documents may have been ignored during the import.

Imported Text in MAXQDA

After importing the table from the example into an empty MAXQDA project, it will appear as follows:

Imported texts in MAXQDA

When importing, MAXQDA proceeds as follows:

  • Document groups that do not yet exist will be created.
  • The headings of the code columns will run from left to right and will be inserted from top to bottom in the code system as new code names, as long as they do not yet exist. All text segments from the code columns will be coded with the respective column headings.
  • If a variable does not yet exist, it will be created. Each document will be assigned the variable value from the variable column.

Was this article helpful?