Frequently Asked Question

How to prefill LimeSurvey questionnaire with existing data
Last Updated 2 years ago

To upload existing data in your questionnaire, you have to use VV file.

VVfile are CSV file in UTF8 format with data separated by tabulation.

For prefilling data : we use survey with participant.

The survey need to be not anonymous, and you need to set Enable token-based response persistence to ON

image

This settings can be found on Settings / Participant settings

In order to upload your data your questionnaire needs to be final and activated.

image

Select “Switch to closed access mode”. Here you choose to address your survey to selected participants.

image

Select “Initialise participant table”. This will create a participant table containing your questionnaire’s

image

An empty participants table has been created. Click on continue.

image

Fill your table with participants.

Different options are available:

  • Manually Add participant
  • Create dummy participants (it will create a defined number of participant with 15 characters
    tokens. Tokens identify each participant.
  • Upload a csv file with your participants

Please check the LimeSurvey manual for more details.

image
image

Click on Responses > Responses and statistic

image

Click on Export > Export a VV survey file

image

Leave the default export settings and hit “Export” button at the top right of the screen.

image

Save the exported file. Open Excel and import the file as text.

image

In the import wizard define the file origin as Unicode (UTF-8)

image
image

The Excel file that I have created has 2 lines. The first one contains the questions ‘labels, the second one contains the questions ‘Codes.

Enter the data into each column for each token (take the tokens from the participant table). In order to understand how to correctly fill up the table, before exporting the VV file, you can complete a dummy questionnaire. The responses inputted in this dummy questionnaire will be there when the VV file is exported.

Data must respect some specific format

  • For single choice : you must use the code of each answer
  • For multiple choice : checked have code Y
  • For date and datetime : format must be YYY-MM-DD for date only and YYY-MM-DD mm:ss if you need time
  • Empty value for date and numeric value didn't exist : you must set as null wit the reserved word : {question_not_shown}

Once the data are entered: Save the Excel file as Tab delimited text file. If you have free text with accent inside the data : you must use Unicode text file.

Another working solution to save as valid Tab Separated value it's to copy paste all content in NotePad++ or WordPad.

Go back to LimeSurvey > Responses > Responses and statistics > Import > Import a VV survey file

image

In the import wizard select the file to import.

image

Exclude record IDs?: if the 'id' column exist in the file you can exclude this line or not. If this setting is on “No” then a new record is added for each line of the .vv file.

If set on “Yes” you can when an imported record matches an existing record ID you can choose:

  • Skip: report and skip the new record. After upload you will see if the record already existed - if it
    did it's not imported. Can be used to add only new data.
  • Renumber: renumber the new record. A new record is added to the response table with answer of the VV file.
  • Replace: replace the existing record. The old record is deleted and completely replaced by the record from the VV file. Can be used to update existing data, but it update whole data.
  • Replace answer: replace response details from the vv file into the existing record. The old record is updated with the new response from the VV file. It can allow update a single column for example. When edition the excel file : you delete all other columns, and just update the needed part.

Refer to the LimeSurvey manual for more details: https://manual.limesurvey.org/Import_responses


Please Wait!

Please wait... it will take a second!