Actions

Export responses: Difference between revisions

From LimeSurvey Manual

mNo edit summary
(48 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Alert|Under construction!
To be deleted at the end : [[Exporting_results]]}}
<languages /> <translate>
<languages /> <translate>
<!--T:1-->
<!--T:1-->
__TOC__
__TOC__


<!--T:2-->
<!--T:2-->
Once your survey is active, you can start browsing responses and export them for further analysis. To access the export function, click on '''Responses''' (displayed on any survey-related panel). From the drop-down menu click on Responses & statistics:
Once your survey is active, you can start browsing responses and export them for further analyses. To access the export function, click on '''Responses''' (displayed on any survey-related panel) and then click on '''Responses & statistics''' from the dropdown menu.




Line 16: Line 12:




<!--T:235-->
The default page that is loaded is [[Response summary]]. Now, look for the '''Export''' option located on the top toolbar:
The default page that is loaded is [[Response summary]]. Now, look for the '''Export''' option located on the top toolbar:


Line 23: Line 20:




<!--T:236-->
Several options are available:
Several options are available:


<!--T:237-->
*[[Export responses#Export responses|Export results]]
*[[Export responses#Export responses|Export results]]
*[[Export responses#Export responses to SPSS|Export responses to SPSS]]
*[[Export responses#Export responses to SPSS|Export responses to SPSS]]
*[[Export responses#VVExport and VVImport|Export a VV survey file]] (the import part is also explained since the two options go hand in hand
*[[Export responses#Exporting a VV survey file|Export a VV survey file]]




=Export responses=
=Export responses= <!--T:238-->




<!--T:239-->
The following panel is displayed when the first export-related option is selected from the drop-down menu:
The following panel is displayed when the first export-related option is selected from the drop-down menu:




<!--T:240-->
<center>[[File:Export responses page.png]]</center>
<center>[[File:Export responses page.png]]</center>




<!--T:241-->
Several filter options are separated into:
Several filter options are separated into:


<!--T:7-->
<!--T:7-->
*'''Format''' - it allows you to select the format in which you wish to export your results. The following formats are available:
*'''Format:''' it allows you to select the format in which you wish to export your results. The following formats are available:
** CSV File (all charsets): see also the ''CSV field separator'' option at the botton of the '''Format''' tab. The default one is "comma". The other options are  "semicolon" and "tab"
** ''CSV File (all charsets):'' see also the "CSV field separator" option at the bottom of the '''Format''' tab. The default one is "comma". The other options are  "semicolon" and "tab"
** HTML
** ''HTML''
** R (data file): if this option is chosen, please also export your survey into R (syntax file). To find out more details about how you can analyse your data in R, check [[Export_responses#Export_R|this wiki subsection]]
** ''R (data file):'' if this option is chosen, please also export your survey into R (syntax file). To find out more details about how you can analyse your data in R, check [[Export_responses#Export_R|this wiki subsection]]
** Microsoft Word (latin charset)
** ''Microsoft Word (latin charset)''
** Microsoft Excel (all charsets)
** ''Microsoft Excel (all charsets)''
** STATA (.xml): for more details on how to analyse your data in STATA, read the following [[Export_responses#Export_STATA-xml|wiki subsection]]
** ''STATA (.xml):'' for more details on how to analyse your data in STATA, read the following [[Export_responses#Export_STATA-xml|wiki subsection]]
** PDF
** ''PDF''
** R (syntax file): if this option is chosen, please also export your survey into R (syntax file). To find out more details on how you can analyse your data in R, check [[Export_responses#Export_R|this wiki subsection]]
** ''R (syntax file):'' if this option is chosen, please also export your survey into R (syntax file). To find out more details on how you can analyse your data in R, check [[Export_responses#Export_R|this wiki subsection]]


<!--T:242-->
*'''General'''
*'''General'''
** Completion state: set to export all records OR completed records only OR incomplete records only. For more information on their meaning, check [[Responses_%26_statistics#Responses_summary|this wiki subsection]]
** ''Completion state:'' set to export all records OR completed records only OR incomplete records only. For more information on their meaning, check [[Responses_%26_statistics#Responses_summary|this wiki subsection]]
** Export language: the default option is the base language of your survey
** ''Export language:'' the default option is the base language of your survey
 
<!--T:243-->
*'''Range''': refers to the id of the stored responses from the [[Responses#The_response_table_page|response table]]. In case the values you introduced are wrong (ie., no response id was found between the values you entered), a pop-up will be displayed when you will try to export the responses asking you to enter values that can be found in the table.
 
 
<!--T:244-->
{{Note|'''Range''' is not displayed if you wish to export [[Export_responses#Export_a_single_response|only one response]] or [[Export_responses#Export_a_group_of_responses|a group of responses]].}}


*'''Range''': refers to the id of the stored responses from the [[Responses#The_response_table_page|response table]]. In case the values you introduced are wrong (ie., no response id was found between the values you entered), a pop-up will be displayed when trying to export the responses asking you to enter values that can be found in the table.


<!--T:245-->
*'''Responses'''
*'''Responses'''
** Export responses as: you can either export full answers or convert answer codes. If the later is selected, the answers submitted by your respondents will be replaced by the answer code of the respective answer.  "Yes" and "No" answers will be converted to "Y" and "N" answers to any string of characters. If "Convert Y/N to" are enabled, then the answer codes that use Y and N as answers will be converted into the strings of characters from their corresponded boxes. By default, the values are 1 for Y and 2 for N.  
** ''Export responses as:'' you can either export full answers or convert answer codes. If the later is selected, the answers submitted by your respondents will be replaced by the answer code of the respective answer.  "Yes" and "No" answers will be converted to "Y" and "N" answers to any string of characters. If "Convert Y/N to" is enabled, then the answer codes that use Y and N as answers will be converted into the strings of characters from their corresponded boxes. By default, the values are 1 for Y and 2 for N.  




<!--T:246-->
{{Note|To better understand the difference between full answer and answer codes, check the following [[Adding_answers_or_subquestions|wiki section]].}}
{{Note|To better understand the difference between full answer and answer codes, check the following [[Adding_answers_or_subquestions|wiki section]].}}




<!--T:247-->
*'''Headings'''
*'''Headings'''
**Export question as: set how the heading should look like. The following options are available:
**''Export question as:'' sets how the heading should look like in the exported file. The following options are available:
***Question code
***Question code
***Abbreviated question text: only a certain part of the question will be displayed (useful if you work with long questions)
***Abbreviated question text: the length of the question is decreased if this option is selected (useful if you work with long questions)
***Full question text (default)
***Full question text (default)
***Question code & question text
***Question code & question text
**Strip HTML code: enabled by default in order not to export the HTML code of your question text
**''Strip HTML code:'' enabled by default in order not to export the HTML used in question text boxes
** ''Convert spaces in question text to underscores:'' disabled by default. If enabled, the spaces from the question text are converted to underscores.  
**''Convert spaces in question text to underscores:'' disabled by default. If enabled, the spaces from the question text are converted to underscores.  
** Text abbreviated: disabled by default. If enabled, the question text will be abbreviated. The length of the question text is given by the number put into the "Number of characters". Please note that this option is useful in the case in which you wish to abbreviate the question texts resulted from selecting either "Full question text" or "Question code & question text" as heading text.
**''Text abbreviated:'' disabled by default. If enabled, the question text will be abbreviated. The length of the question text is given by the number put into the "Number of characters". Please note that this option is useful in the case in which you wish to abbreviate the question texts resulted from selecting either "Full question text" or "Question code & question text" as heading text.
** Use Expression Manager code: disabled by default. If enabled, the questions and subquestions will be exported as they are used within the ExpressionScript. Therefore, the heading would resemble the [[Expression_Manager_-_presentation#Qcode_variable_naming|qcode variable naming]]. Please note that one of the following question heading options must be chosen: Question code or Question code & question text.   
** ''Use Expression Manager code:'' disabled by default. If enabled, the questions and subquestions will be exported as they are used within the ExpressionScript. Therefore, the heading would resemble the [[Expression_Manager_-_presentation#Qcode_variable_naming|qcode variable naming]]. Please note that one of the following question heading options has to be chosen: "Question code" or "Question code & question text".   
** Number of characters: set up a maximum number of characters to be displayed in the headings. This option works if you wish to export your question as abbreviated question text. The default number is 15.
** ''Number of characters:'' set up a maximum number of characters to be displayed in the headings. This option works if you wish to export your question as abbreviated question text. The default number is 15.
** Code/text separator: select the option you wish to use to separate the question code from the text of the question. By default, it is a "dot" followed by an empty string (<SPACE>).
** ''Code/text separator:'' select the option you wish to use to separate the question code from the text of the question. By default, it is a "dot" followed by an empty string (<SPACE>).


*'''Column Control''': set which answers should be exported. All answers in this list are represented by their question code and question text. By default, all responses are to be exported. To select multiple columns, use CTRL and/or SHIFT keys.  
<!--T:248-->
*'''Column Control''': sets the questions (and their corresponding answers) to be exported. The questions in this list are represented by their corresponding question code and question text. By default, all columns will be exported. To select multiple columns, use CTRL and/or SHIFT keys.  


*'''Token control''' - set which '''''survey participant''''' data should be exported. This option is only available if your survey is [[not anonymous]]! For more details on what a [[Survey participants|survey participant table]] is, check the following wiki section.
<!--T:249-->
*'''Token control''' - sets which '''''survey participant''''' data should be exported. This option is only available if your survey is [[Participant_settings#Anonymized_responses|not anonymous]]! Click here for more information on what a [[Survey participants|survey participant table]] is and how you can use it in LimeSurvey.




<!--T:8-->
<!--T:8-->
[[File:export_tokens.png]]
<center>[[File:export_tokens.png]]</center>




Line 91: Line 105:


<!--T:26-->
<!--T:26-->
The freeware software [http://www.r-project.org/ R] is an alternative for SPSS.
The free software environment [http://www.r-project.org/ R] is an alternative for SPSS used for statistical computing and graphics.


<!--T:232-->
<!--T:232-->
Follow the following steps to import your dataset in R:
'''Follow these steps to import your dataset in R:'''
Instructions on how to import your dataset in R:
 
#Download '''both''' the syntax file and the data file
<!--T:250-->
#Store both files in your R working directory (use ''getwd()'' and ''setwd()'' in a R command window to get and set)
#Download '''both''' the syntax file and data file
# Enter ''source("Surveydata_syntax.R", encoding = "UTF-8")'' in the R command window. It will import the data in the correct format to a data frame called "data".
#Store both files in your R working directory (use ''getwd()'' and ''setwd()'' in a R command window to get and set your working directory)
#Enter <code>source("File_name_syntax.R")</code> in the R command window. It will import the data in the correct format to a data frame called "data".
 
 
<!--T:251-->
{{Note|You may also use [https://www.rstudio.com/products/rstudio/download/ RStudio] (free open source solution) to work with your data in R in a nice and easy-to-understand GUI. By following the above guideline, your data should look like this:
 
 
<!--T:252-->
<center>[[File:Rstudio-screen1.png]]</center>
 
<!--T:253-->
<center>[[File:RStudio-screen2.png]]</center>}}
 


<!--T:233-->
<!--T:233-->
Line 107: Line 134:


<!--T:230-->
<!--T:230-->
<div class="simplebox"> '''R-export''' is a plugin in Limesurvey. If you cannot find the R-export options (''R (syntax file)'', ''R (data file)'')  under ''Export results to application'', make sure the R-export plugin is enabled in the plugin menu.
<div class="simplebox"> '''R-export''' is a plugin in LimeSurvey. If you cannot find the R-export options (R (syntax file), R (data file)) under '''Format''', make sure the R-export plugin is enabled in the [[Plugin menu|plugin menu]].




<!--T:254-->
<center>[[File:Export results to R plugin.png]]</center></div>
<center>[[File:Export results to R plugin.png]]</center></div>


Line 120: Line 148:


<!--T:203-->
<!--T:203-->
This export routine was created to facilitate rapid analysis of data collected with LimeSurvey. It creates an XML-file in STATAs proprietary format, which can be imported independent of the platform STATA is run on. Using this format offeres several advantages over importing plain CSV files:
This export routine was created to facilitate rapid analysis of data collected with LimeSurvey. It creates an XML-file in STATAs proprietary format. This format offers several advantages over importing plain CSV files:
*Data sets are fully labelled including variable labels (question, subquestion) and value labels (answers, if applicable).
*Data sets are fully labelled including variable labels (question, subquestion) and value labels (answers, if applicable).
*Dates are already transformed to STATAs internal date format and thus can directly be used to calculate difference between days etc.
*Dates are already transformed to STATAs internal date format and thus can directly be used to calculate differences between days etc.
*Variable names are, if necessary, converted to a STATA compatible format.
*Variable names are, if necessary, converted to a STATA compatible format.
*Data formats of variables (string, integer, float, etc.) are already set according to the underlying data. (No more numbers encoded as strings!).  
*Data formats of variables (string, integer, float, etc.) are already set according to the underlying data (no more numbers encoded as strings!).  


<!--T:204-->
<!--T:204-->
'''Howto load the file in STATA:
'''How to load the file in STATA:'''
In STATA's menu, click on File, Import, xml-data. Choose browse to navigate to your exported file and click 'OK'. That should be it.
# In STATA's menu, click on File, Import, xml-data
If you prefer STATA's binary .dta files, you can just save your data again in this format.
# Choose browse to navigate to your exported file and click 'OK'.
'''
 
<!--T:255-->
{{Note|If you prefer STATA's binary .dta files, you can just save your data again in this format.}}
 


<!--T:205-->
<!--T:205-->
'''Be aware:'''
{{Alert|title=Attention|text=
*Due to a limitation in STATA's data format, the length of string (text) variables have a maximum of 244 characters (Stata versions 8-12) and 2045 characters (Stata version 13 and above). Please indicate your Stata version in the settings of the export plugin.
*Due to a limitation in STATA's data format, the length of string (text) variables have a maximum of 244 characters (Stata versions 8-12) and 2045 characters (Stata version 13 and above). Please indicate your Stata version in the settings of the [[Plugin menu|export plugin]]:  
*STATA only supports attaching value labels to numerical values. So to achieve short answers (usually one or two digits) and have these properly labelled, one should use numerical answer-codes in LimeSurvey (1=Totally agree).cIf non-numerical answer codes are used (A=Totally agree), then the complete answer text will be used as answer (eg.: 'Totally agree').




<!--T:256-->
<center>[[File:STATA export plugin.png]]</center>
<center>[[File:STATA export plugin.png]]</center>




<!--T:257-->
<center>[[File:Export_for_stata.png]]</center>
<center>[[File:Export_for_stata.png]]</center>
<!--T:258-->
*STATA only supports attaching value labels to numerical values. So, to achieve short answers (usually one or two digits) and have these properly labelled, one should use numerical answer-codes in LimeSurvey (1=Totally agree). If non-numerical answer codes are used (A=Totally agree), then the complete answer text will be used as answer (eg., 'Totally agree').}}


=Export responses to SPSS= <!--T:9-->
=Export responses to SPSS= <!--T:9-->
Line 147: Line 184:


<!--T:231-->
<!--T:231-->
SPSS Statistics is a software package used for logical batched and non-batched statistical analysis. You can use official SPSS package or use [https://www.gnu.org/software/pspp/ GNU PSPP] replacement for the proprietary program SPSS.
SPSS Statistics is a software package used for logical batched and non-batched statistical analysis. You can use the official SPSS package or [https://www.gnu.org/software/pspp/ GNU PSPP] replacement for the proprietary program SPSS.


<!--T:11-->
<!--T:11-->
To export your response data to SPSS go to Responses & Statistics section and click the icon to export to SPSS.
To export your response data to SPSS, go to '''Responses & statistics''' section and select the SPSS-corresponding option located under the '''Export''' menu:
 
 
<!--T:259-->
<center>[[File:Export2Spss.png]]</center>
 
 
<!--T:260-->
The following page is displayed:




<!--T:261-->
<center>[[File:Export response data to SPSS.png]]</center>
<center>[[File:Export response data to SPSS.png]]</center>




===Export and filter data=== <!--T:13-->
<!--T:262-->
 
The following options are displayed in the panel:


<!--T:14-->
<!--T:14-->
When exporting data to SPSS there are two filter options. You can select '''which data''' should be selected (''all records/completed records only/incompleted records only'') and for '''which SPSS version''' the export files will be used (''prior version 16/16 or up'').
*'''Data selection:''' you can select which data should be selected for export: all responses OR only complete responses OR only incomplete responses
 
*'''SPSS version:''' check your SPSS installation version. Two different export options can be chosen: prior to version 16 and 16 or up
*'''Language:''' acts like a filter that allows you to filter the exported responses based on the language used to fill out the survey
*'''Limit:''' type in any numerical value to get exported only the first "n" entries from your response table
*'''Offset:''' type in any numerical value to get exported your response table without the first "n" entries from your response table
*'''No answer:''' if left empty, an empty string is stored as answer for the questions that have not been answered by respondents. Type in this box any string of characters to replace the empty string. The set of characters will be displayed in the exported .dat file


<!--T:15-->
<!--T:15-->
Line 168: Line 218:
# and a data file (''survey_xxxx_SPSS_data_file.dat'').
# and a data file (''survey_xxxx_SPSS_data_file.dat'').


<!--T:16-->
After having downloaded these files you can open them using a raw text editor like notepad to take a look how the exported data looks like. The syntax file holds the commands that should be run to import the data. It is like a programming language inside SPSS. The .dat file contains a comma separated file with all data. '''We recommend you not to import your data as csv''' because there is the risk of loosing information about questions, label sets, and so on.
==Import LimeSurvey responses to SPSS== <!--T:263-->


<!--T:16-->
After having downloaded these files you can open them using a raw text editor like notepad to take a look how the exported data looks like. The syntax file holds the commands that should be run to import the data. It is like a programming language inside SPSS. The data file contains a comma separated file with all data. If you just import this data as csv via a wizard you loose information about questions, labelsets etc. so we don't do that.


<!--T:264-->
To import your data to SPSS, pursue these steps:
#Download the data and the syntax file.
#Open the syntax file in SPSS in Unicode mode.
#Edit the 'FILE=' line and complete the filename with a full path to the downloaded data file.
#Choose 'Run/All' from the menu to run the import.
#Done


=VVExport and VVImport= <!--T:27-->


=VVExport= <!--T:27-->


These two options are explained concomitent since they should be used together when you wish to edit and modify large quantities of data - to be reformulated


<!--T:28-->
<!--T:28-->
Once you've begun collecting responses, there may be occasions where you need to be able to directly edit and modify large quantities of data from your responses table, where a spreadsheet tool may be more useful.
Once you've begun collecting responses, there may be occasions where you need to be able to directly edit and modify large quantities of data from your responses table (where a spreadsheet tool may be more useful).


<!--T:29-->
<!--T:29-->
Line 185: Line 244:




<!--T:30-->
<!--T:265-->
Things you should be aware of:
<div class="simplebox">'''When do I need to use VVExport and VVImport?
* If you want to import responses using "VVImport" make sure to check whether the responses should be added to the existing responses or all responses should be overwritten.
It is often used in three scenarios:
* If you are trying to import responses from a different yet identical (e.g. identical questions/answers from another survey) make sure you are using the correct vv file and that the first two lines of the .csv-file are correct.
# In the first one, it is used to combine large amounts of data in one LimeSurvey installation. Imagine that you run two similar surveys on two different machines. In order to combine the two response tables, you will have to use VVExport, VVImport, and a third-party app (e.g., spreadsheet apps) to combine your data and put it on one LimeSurvey installation.
* If you import a survey to your LimeSurvey installation the SID will (if possible) not change. The group id and question id however might change. So you might have to adjust the first two heading lines to match the new group id/question id. See '''Adjusting vv file headings'''
# It may also be used to edit the response table of a survey. For small edits, you can access the [[Responses#The_response_table_page|response table]] and edit the desired answers. Still, for "macro-editing", VVExport and VVImport are recommended because a spreadsheet program can help you quickly edit dozens of responses at the same time.
# A "vv survey file" allows you to import the responses to a survey when the question/answer combinations have changed. Effectively, this allows you to add or remove questions in an active survey.
 
<!--T:307-->
'''Attention!''' To add, remove or '''edit''' questions, you have to deactivate your survey, do the changes, and then activate it again. The old response table that was created as a result of the [[Closing_a_survey#Deactivation|response table deactivation]] can be imported into the newly activated survey by selecting '''Import''' -> '''Import responses from a deactivated survey table'''. For more details, check this [[Import responses#Import responses from a deactivated survey table|wiki subsection]].</div>
 
 
<!--T:266-->
To export your data via VVExport, go to [[Responses & statistics]] section and select the VV-corresponding option located under the '''Export''' menu:




== VVExport file version 2 == <!--T:207-->
<!--T:267-->
This new feature allows different column names than the database. If your question code are unique, then the new version is selected. In the new version each column name uses the [[Expression_Manager#Qcode_Variable_Naming|Qcode Variable Naming]]. For example this allows to update an existing survey in different installation  more easily.
<center>[[File:Export VV button.png]]</center>




==Exporting a VV survey file== <!--T:31-->
<!--T:268-->
The following page will be loaded:




<!--T:33-->
<!--T:210-->
When you choose to export responses using VVExport you will be given the option to choose which survey to be exported, whether you want to export all responses or complete responses only or incomplete responses only. The file extension allows you to choose which extension the exported file will have. For easy use .csv should be chosen.
<center>[[File:VV2-export-en.png]]</center>


<!--T:34-->
A 'vv survey file' allows you to import the responses to a survey when the question/answer combinations have changed. Effectively this allows you to add or remove questions in an active survey.


<!--T:35-->
<!--T:211-->
Clicking on "Export a VV survey file" will then produce a tab delimited file that can be opened by Excel or similar style spreadsheet program. The first two rows of the spreadsheet are the column labels. The first row is a "human readable" column heading that details the name of the question/answer field. The second row is the internal PHP/database column name for that response.
* '''Survey ID:''': The ID of the survey to be exported
* '''Export:''' The completion state of the responses to be exported:
**''Completed responses only:'' if a respondent reaches the last page of a survey and clicks the '''Submit''' button, then his or her response is marked as being complete
**''Incomplete responses only:'' if a respondent does not click on that ''Submit'' button located before the end page, then the response is marked as being incomplete 
**''All responses:'' export both completed and incomplete responses
* '''File extension:''' The file extension. The file is a TSV ([[wikipedia:Tab-separated_values|tab-separated values]]) file. For easy opening in MS-Excel set the extension to .txt. If you use LibreOffice, OpenOffice or any other spreadsheet program, you can leave it to .csv (default format)


<!--T:36-->
You should not modify the first two rows of this spreadsheet if you want to be able to "import" the data back into LimeSurvey at a later point.


<!--T:212-->
{{Note|The first two rows of the spreadsheet are the column labels. The first row is a "human readable" column heading that details the name of the question. The second row is the real column name (Internal DB- or Qcode-name) for that response.}}


===Exporting a VV survey file=== <!--T:208-->


<!--T:269-->
* '''VV export version:''' The 1.0 version (''Old VV version'') uses database column headers, version 2.0 (Last VV version) uses [[Expression_Manager#Qcode_Variable_Naming|Qcode Variable Naming]]. Version 2.0 is selected by default if all of your question code are unique.


<!--T:210-->
[[File:VV2-export-en.png|center]]


<!--T:211-->
<!--T:270-->
* '''Export survey''' : The survey ID to be exported (read-only)
{{Note|''Last VV version'' allows different column names than the ones from the database. If your question codes are unique, then the new version is selected. In the new version each column name uses the [[Expression_Manager#Qcode_Variable_Naming|Qcode Variable Naming]]. The update of surveys is [[Export responses#Editing a VV survey file|easier]] in this way.}}
* '''Export''' : The completion state of the responses to be exported
* '''File extension''' : The file extension. The file is a TSV ([[wikipedia:Tab-separated_values|Tab-separated values]]) file. For easy opening in MS-Excel set the extension to .txt, with LibreOffice, OpenOffice or other spreadsheet program you can leave it to .csv.
* '''VV export version''' : The 1.0 version uses database column headers, version 2.0 uses [[Expression_Manager#Qcode_Variable_Naming|Qcode Variable Naming]]. Version 2.0 is selected by default if all of your question code are unique.


<!--T:212-->
The first two rows of the spreadsheet are the column labels. The first row is a "human readable" column heading that details the name of the question. The second row is the real column name (Internal DB- or Qcode-name) for that response.


<!--T:30-->
{{Alert|title=Attention|'''Things you should be aware of:'''
* If you want to import responses using "VVImport" make sure to check whether the responses should be added to the existing responses or all responses should be overwritten.
* If you are trying to import responses from a different yet identical (e.g., identical questions/answers from another survey), make sure you are using the correct vv file and that the first two lines of the .csv file are correct.
* If you import a survey to your LimeSurvey installation the SID will not change (if possible). The group id and question id however might change. So you might have to adjust the first two heading lines to match the new group id/question id.}}


==Editing a VV survey file== <!--T:37-->


==Exporting a VV survey file== <!--T:31-->


<!--T:38-->
When a .vv file has been successfully exported you can use a spreadsheet tool to open and edit the file. If you have to choose a column separator when opening the file please use the "Tab" character. If you are using non-ASCII characters make sure you set "UTF-8" as character set.


<!--T:39-->
<!--T:33-->
{{Alert|If you are using Microsoft Excel to edit the exported vv file, you should know that excel destroys the original data structure of the file. This causes an error when you try to re-import the edited .vv file.}}
When you choose to export responses using VVExport, you will be given the option to choose whether you want to export all responses or complete responses only or incomplete responses only. The file extension allows you to choose which extension the exported file will have. For easy use, .csv should be chosen.


<!--T:41-->
<!--T:35-->
By default the first two rows of the .vv file are headers. If needed you can remove the first line to have a real TSV file. There are different use cases for importing a .vv file so we will differentiate between adding new responses to a survey and overwriting all responses of the survey.
The first two rows of the spreadsheet/tab-delimited file are the column labels. The first row is a "human readable" column heading that details the name of the question/answer field. The second row is the internal PHP/database column name for that response.


<!--T:42-->
<!--T:36-->
Example structure of a .vv file:
You should not modify the first two rows of this spreadsheet if you want to be able to "import" the data back into LimeSurvey at a later point.


==VV files structure - example== <!--T:42-->


===VV version 1 TSV file=== <!--T:213-->
===VV version 1 TSV file=== <!--T:213-->
Line 271: Line 340:


<!--T:217-->
<!--T:217-->
Here SQGA identifier are not used - instead Qcode variable naming <code>QCODE</code> is used in the second line.
In this example, the SQGA identifiers are not used - instead, the Qcode variable naming <code>QCODE</code> is used in the second line.
 
<!--T:271-->
<div class="simplebox">To understand the difference between SGQA and Qcode, please check the following two wiki sections:
* [[SGQA_identifier|SGQA wiki section]]
* [[Expression_Manager_-_presentation#Qcode_variable_naming|Question code wiki section]]
 
<!--T:272-->
We generally recommend our users to use question codes since they are much easier to be used (it represents an addition to the SGQA system used in the earlier versions of LimeSurvey.
</div>




===Reserved names=== <!--T:218-->
==Reserved names== <!--T:218-->




<!--T:219-->
<!--T:219-->
.VV file uses left and right brackets for reserved names, when importing this string is replaced by :
A .vv file uses left and right brackets for reserved names. When importing, this string is replaced by:
* <code>{question_not_shown}</code> : NULL value in database. LimeSurvey use [empty string] for not answered question, and NULL value for question not shown (by Expression manager or max step in survey).
* <code>{question_not_shown}</code> : NULL value in database. LimeSurvey uses [empty string] for not answered question, and NULL value for questions not shown.
* <code>{quote}</code> : " (a double quote)
* <code>{quote}</code> : " (a double quote)
* <code>{cr}</code> : Carriage return
* <code>{cr}</code> : Carriage return
* <code>{newline}</code> : A new line
* <code>{newline}</code> : A new line
* <code>{lbrace}</code> : Left bracket (for example, if you want to have {cr} in response : use <code>{lbrace}cr}</code> )
* <code>{lbrace}</code> : Left bracket (for example, if you want to have {cr} in response : use <code>{lbrace}{cr}</code> )


==Editing a VV survey file== <!--T:37-->


===VV Version 1 editing=== <!--T:220-->


<!--T:38-->
When a .vv file has been successfully exported you can use a spreadsheet tool to open and edit the file. If you have to choose a column separator when opening the file please use the "Tab" character. If you are using non-ASCII characters make sure you set "UTF-8" as character set.


====Adding new responses to the existing responses of a survey==== <!--T:50-->
This is not supported for version 1 of the format as it easily can lead to various problems including data being imported into the wrong columns. The version 1 of the .vv file was always meant for vertical verification of data in an external tool like Excel, not as a mean to pull together data from different source (like the same survey running on another server).


<!--T:39-->
{{Alert|If you are using Microsoft Excel to edit the exported vv file, you should know that Excel destroys the original data structure of the file. This causes an error when you try to reimport the edited .vv file. The workaround is to save as a .txt file once you edited the data from the .csv file. If you save as .csv, Excel uses comma-delimits which will not import into LimeSurvey. By saving as a .txt file, Excel saves as a tab-delimited file which can be imported into LimeSurvey. For other Excel-related issues, check this [[Problems_%26_solutions#Excel|wiki subsection]].}}


====Modify all responses of a survey==== <!--T:74-->
<!--T:273-->
 
If you simply wish to simply edit your data, then be careful at the first two columns so that you can later easily VVImport your data back into your LimeSurvey installation!
<!--T:75-->
If you want to modify responses of survey you can just add the edit the file.
 
<!--T:76-->
'''Example:'''
 
<!--T:77-->
Step 1: Open the file
 
<!--T:221-->
<syntaxhighlight lang="text" enclose="div">
Response ID Date submitted Last page Start language please vote from 1 to 6 (1 - super, 6 - worst)
id submitdate lastpage startlanguage 46492X40X1991
183 09.11.11 11:44 3 de 4
184 09.11.11 11:53 3 de 2
190 09.11.11 11:44 3 de 1
</syntaxhighlight>
 
 
<!--T:85-->
Step 2: Modify responses
 
<!--T:222-->
<syntaxhighlight lang="text" enclose="div">
Response ID Date submitted Last page Start language please vote from 1 to 6 (1 - super, 6 - worst)
id submitdate lastpage startlanguage 46492X40X1991
1000 09.11.11 11:44 3 de 3
1001 09.11.11 11:53 3 de 3
1002 09.11.11 11:44 3 de 3
</syntaxhighlight>
 
<!--T:95-->
You can then import the survey, make sure to override the existing responses (see "Importing a VV survey file").
 
=Import=
 
==Import responses from a deactivated survey table==
 
<center>[[File:Import responses from a deactivated survey table.png]]</center>
 
 
==Importing a VV survey file== <!--T:125-->
 
<!--T:126-->
<center>[[File:LimeSurveyImportVVen.jpg]]</center>
 
<!--T:127-->
As long as the first two lines are intact, you can then import the data in your vv survey file back into an active LimeSurvey survey.
 
<!--T:128-->
If you used Microsoft Excel to edit the exported vv file, the data structure of this file may be corrupted, so LimeSurvey is not able to import the edited file. You can try the following workaround to get the import working without an error:
*Open your exported vv file in Excel and do your changes (I guess you already did that)
*Save it as tab-separated text file (It creates a new file with the extension .txt)
*Do another "clean" vv export from LimeSurvey
*Open this new exported vv file with a texteditor like notepad or something else (I used textwrangler on mac)
*Press CTRL + A to mark all of the content and delete it
*Open the Excel edited vv file (the tab separated .txt file) with a texteditor and press CTRL + A to mark all of the content
*Press CTRL + C to copy the content and paste it into the new (now empty) vv file
*Press CTRL + S to save the file as it is (as .csv)
*Now try to import this file


<!--T:129-->
<!--T:274-->
Then, from the browse screen, choose the "Import a VV Survey file" icon.
If you combine data from two different surveys, please note that the old VV version uses [[SGQA_identifier|SGQA]] which will most probably give you different "question ids". Therefore, be careful how you merge the data!


<!--T:130-->
<!--T:275-->
The "Import a VV Survey File" screen needs you to choose the "vvexport" file you are importing. If you choose to "Exclude Record IDs" the records will be imported and brand new Record ID's will be generated for them (use this option for the use case "Adding new responses to the existing responses of a survey"). If you un-check this box, then the original record id's will be imported (use this option for the use case "Overwriting all responses of the survey").
The alternative would be to use the last VV version because question codes can be constant throughout different LimeSurvey installations (if you use the same survey structure across multiple LimeSurvey instances).


<!--T:131-->
<!--T:276-->
There are a range of options you can choose that tell LimeSurvey how to deal with double or multiple entries.
When importing the VV file, if two response IDs match and the '''Exclude record IDs''' is disabled, you can make LimeSurvey:
*Report an error (and skip the new record).
*Report and skip the new record
*Renumber the new record
*Renumber the new record
*Replace the existing record (uses this for the use case "Overwriting all responses of the survey")
*Replace the existing record
*Replace answers in file in the existing record


<!--T:277-->
{{Note|For more information on how to import a VV file, check the following wiki subsection: [[Import_responses#Import_a_VV_survey_file|Import a VV survey file]].}}


===Importing a VV survey file {{NewIn|2.05}}=== <!--T:227-->
=Other export options= <!--T:132-->
 
 
<!--T:228-->
<center>[[File:VV2-import-en.png|center]]</center>
 
<!--T:229-->
* '''File''' : Select the file to be uploaded. The file must be a [[wikipedia:Tab-separated_values|TSV file]]: A text file with each column separated by TAB.
* '''Exclude record IDs?''' : If 'id' column exist in the file you can exclude this line or not. If this setting is checked then a new record is added for each line of the .vv file. If unchecked you can choose:
* '''When an imported record matches an existing record ID''':
** ''skip'' : Report and skip the new record. After upload you will see if the record already existed - if it existed it's not imported.
** ''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
** ''replaceanswer'' : Replace response details from the file in the existing record. The old record is updated with the new response from the VV file. This allow to replace only one question in the response table.
* '''Import as not finalized response?''' : If checked the submitdate is set to NULL, so the response is set to not completed.
* '''Character set of the file''' : You can choose the character set of the file - the default and recommended value is UTF-8 but some spreadsheet program don't allow to choose a character set.
* '''First line contains question codes''' : By default VV file first line contain human readable question, the real column names are in the second line. This allow to use the first line as the real column names.
* '''Force import''' : If the question codes are not found in the database name or in [[Expression_Manager#Qcode_Variable_Naming|Qcode Variable Naming]] then columns are assigned depending of order. This can be used to import VV file from different LimeSurvey instance but each survey must be exactly the same. We strongly recommend to use this only if you know what you are doing. It can be very dangerous and lead to results ending up in the wrong column.




=Other export options= <!--T:132-->
<!--T:278-->
In case you do not need to export the whole survey, you can also choose to export only:
* [[Export responses#Export a single response|a single responses]] or
* [[Export responses#Export a group of responses|a group of (filtered) responses]]




Line 396: Line 405:


<!--T:134-->
<!--T:134-->
If you want to export an individual response, you can do it in 3 ways:
If you want to export an individual response, you can do it in two ways:


<!--T:135-->
<!--T:135-->
1. Login to limesurvey admin backend, choose your survey, goto "Edit survey settings" -> "Notification and data management" and make sure you receive basic email notifications.
1. Login to LimeSurvey, choose your survey, click on [[Notifications & data]] tab and make sure you receive basic email notifications:


<!--T:136-->
Every time someone has completed a survey, you will receive an email with a link: "Click the following link to see the individual response"


<!--T:137-->
<!--T:279-->
This will take you to a page with a button above the data saying "Export this response"
<center>[[File:Receive emails detailed.png]]</center>


<!--T:138-->
2. Login to limesurvey admin backend, choose your survey and "Browse responses for this survey". Click on "Display responses" and the id number you want to export in the left column. Then you can click on "Export this survey" above the data.


<!--T:139-->
<!--T:136-->
3. Login to limesurvey admin backend, choose your survey and "Export results to application". In the last field above "Export data" you can choose which entry you want to export.
Every time someone has completed a survey, you will receive an email with a link: "Click the following link to see the individual response". This will take you to a page with a button above the response data saying "Export this response":




==Match responses from different surveys== <!--T:140-->
<!--T:280-->
<center>[[File:Export one response 2.png]]</center>




<!--T:141-->
<!--T:281-->
If you want to track survey responses for particular individuals over time, LimeSurvey can help you do that. A possible use case is to track group responses before and after the group takes a particular seminar.
Choose how the single response will be exported:


<!--T:142-->
The steps to implementing this are as follows:


<!--T:143-->
<!--T:282-->
1. Create the survey
<center>[[File:Export one response 3.png]]</center>


<!--T:144-->
2. Make sure the survey is non-anonymous and uses tokens. To create a non-anonymous survey:


<!--T:145-->
<!--T:283-->
a - Click on the icon General settings.
{{Note|You can observe that no '''Range''' export option is displayed since you export only one answer}}


<!--T:147-->
b - Then under the Tokens tab select "No" for Anonymized responses.
<!--T:149-->
3. Activate the survey.
<!--T:150-->
When you activate the survey, click on the "switch to closed-access mode" button to create the token table:
<!--T:151-->
<center>[[File:switch_to_closed.png]]</center>
<!--T:152-->
4. Populate the tokens table with whatever method you wish (follow the instructions found at the [[Tokens]] page ).
<!--T:153-->
5. Export the survey results and make sure you include the token information.
<!--T:154-->
To export click ''browse results''...
<!--T:155-->
<center>[[File:browse_results.png]]</center>
<!--T:156-->
...and then ''export'':
<!--T:157-->
<center>[[File:export2.png]]</center>
<!--T:158-->
Remember to choose one or more elements from the token table to associate with the survey responses:
<!--T:159-->
<center>[[File:export_tokens.png]]</center>
<!--T:160-->
6. When you run the survey again, which can easily be done by copying the survey and tokens table using export/import, just repeat the steps, and make sure the same query is used to build the csv token import file.
=Problems & Solutions= <!--T:161-->
==Excel== <!--T:162-->
===Modifying responses in Excel prior to Import=== <!--T:163-->
<!--T:164-->
In order to make multiple changes to responses, you may choose to Export and open a file in Excel. Make changes to the data (other than the top lines) and then save as a .txt file. If you save as .csv, Excel uses comma-delimits which will not import into LimeSurvey. By saving as a .txt file, Excel saves as a tab-delimited file which imports back into LimeSurvey.
===Edit .csv with Excel=== <!--T:165-->
<!--T:166-->
In general '''''we do not recommend to use Excel to edit the exported .csv files''''' because Excel does some changes to the internal data structure which results in a failing import. If you nevertheless want to use Excel you have to set the seperator for Excel to a comma in System Control (Windows Systems):
<!--T:167-->
System Control|Region- Languageoptions|Regional Settings, customize...|Tab Numbers|Digit grouping symbol| replace ; with ,
===Workaround to edit .csv files with Excel=== <!--T:168-->
<!--T:169-->
Using Excel for editing questions can prevent you from being able to re-import them. But editing is the way to go if you have more than 5 or so options or ranking options, want to use Excel capabilities like sorting, etc.
<!--T:170-->
This is a partial workaround that seems to work in 1.82-essentially, only use Excel on the part of the file that is the data:
* Export a question similar to what you would like to reuse as .csv file
* Open the CSV file in a rawtext editor
* Copy the part that has the answers to Excel, and parse it with Text to Columns or equivalent.
* Use the talent of Excel to allow pasting text in columns to paste in 20, 50, 100 answers, as you wish
* Save the file as Excel CSV, which will likely have no quotes.
* Open this file in the editor, and Select All, Copy
* Go back to the file you opened with the rawtext editor
* Paste over the answers there
* Save AS, with a different name, maybe one that you can remember for reuse
* Import this file.
===Excel - export limited to 255 columns=== <!--T:171-->


<!--T:138-->
2. Login to your LimeSurvey installation/instance, choose your survey. Select tab [[Responses]] located under the '''settings''' tab:


<!--T:172-->
Due to limitations in Excel (versions lower and equal to 2003), LimeSurvey can export only 255 columns at the same time. Microsoft has proposed a [http://support.microsoft.com/kb/272729/en-us workaround as a VB macro].


<!--T:173-->
<!--T:284-->
Although newer spreadsheets (Excel >= 2007, OpenOffice) can display more than 255 columns, the internal module used by LimeSurvey still can't export more than 255 columns.
<center>[[File:Responses settings menu.png]]</center>


<!--T:174-->
Two workarounds are however possible, use one of the following solutions:
* Either export to CSV and import in your spreadsheet
* Or use multiple exports (selecting at most 250 columns at a time), then merge the exported results


<!--T:285-->
{{Note|[[Responses]] and [[Statistics|statistics]] options are displayed under the '''settings tab''' only if the survey is '''not''' [[Closing_a_survey#Deactivation|deactivated]].}}


===Excel/.csv - export fails=== <!--T:175-->


<!--T:286-->
See the "action" column. Hover the mouse over each option and see which one allows you to see the response details (the first button):


<!--T:176-->
If you are unable to export your data to excel or into a .csv file please try to clear your browser cache and cookies.


<!--T:287-->
<center>[[File:Export one response 1.png]]</center>


==CSV== <!--T:177-->


<!--T:288-->
The response entry will be loaded. Click on the "Export this response" button. You will be redirected to a panel from where you can select how the exported file should look like:


===CSV defaults to 255 columns=== <!--T:178-->


<!--T:289-->
<center>[[File:Export one response 3.png]]</center>


<!--T:179-->
When exporting large surveys the GUI by default limits the export to the first 255 columns. To work around this, simply mark all data sets for export.




==SPSS export== <!--T:180-->
<!--T:290-->
<hr width="50%" style="margin:auto">  




===General steps=== <!--T:181-->
<!--T:291-->
As you can observe, you can also export the response as a pdf file:




<!--T:182-->
<!--T:292-->
To import the LimeSurvey response data please use the following steps:
<center>[[File:Export a response as pdf.png]]</center>
#Click on the 'Export to SPSS' icon.
#From the select boxes select which responses you want to export and your SPSS version.
#Download both files, the .sps (SPSS syntax command file) and .dat file (data file)
#Open the .sps file with SPSS by opening SPSS, then select 'Choose another type of file' and select the downloaded .sps file.
#Now an editor opens inside SPS where you can edit the commands in that file. Look for the line that starts with '/FILE=...'
#Edit that line and adjust the path so it points to your .dat file. Example: Your *.dat file is in c:\temp so set this line to  /FILE='c:\temp\survey_(xxxx)_SPSS_data_file.dat'
#Now select all commands inside the editor by pressing CTRL-A.
#From the SPSS menu select Run/All.
#Be patient, it will take some time to import all data and labels. Check the status bar for the progress.
#Done!




===Possible error messages in SPSS=== <!--T:183-->
<!--T:293-->
This option is usually needed when you wish to share to one of your respondents his/her results. In the case in which you wish to share only certain parts of his/her answer, check the pdf export option located in the [[Statistics#Statistics_-_expert_mode|Statistics panel]]. In this way, you can hide your ''hidden questions'' and/or ''different assessments'' you run "in the background".




====ERROR. command name:Get Data==== <!--T:184-->
==Export a group of responses== <!--T:294-->




<!--T:185-->
<!--T:295-->
If you receive the error message ''ERROR. command name:Get Data. 2267 Unexpected Token missing.'' please edit the forth line of your syntax file so it points to the absolute path of the data file like
This option is useful in the case in which you wish to export a certain group of filtered responses.


<!--T:186-->
<!--T:296-->
<div class="simplebox">C:\spss\Data\limesurvey\SPSS\survey_35276_SPSS_data_file.dat</div>
To do it, access your [[Responses#The_response_table_page|Responses table]] table:




====Error: "Text value unmappable in the current server locale"==== <!--T:187-->
<!--T:297-->
<center>[[File:Responses settings menu.png]]</center>




<!--T:188-->
<!--T:298-->
This error can happen if you try to open an exported syntax file in SPSS 16. The solution is to force SPSS to interpret the syntax file as unicode.
{{Note|[[Responses]] and [[statistics|statistics]] options are displayed under the '''settings tab''' only if the survey is '''not''' [[Closing_a_survey#Deactivation|deactivated]].}}


<!--T:189-->
<div class="simplebox">Open SPSS. Go to Edit > Options > Character encoding for data and syntax. Change the option to "unicode".</div>


<!--T:190-->
<!--T:299-->
LimeSurvey data can now be exported to SPSS 16 without any problem.
You can either order the responses according to the value from each column by clicking on the column label or you can type in the empty boxes located below the column labels a string of characters according to which you wish your data to be filtered to.  




===Define the scale to use for your variable=== <!--T:191-->
<!--T:300-->
<center>[[File:Filter group of responses.png]]</center>




<!--T:192-->
<!--T:301-->
It is possible to override the default scale used for a variable by setting the question attribute [[Advanced question settings#scale_export|scale_export]] to the appropriate value.
<div class="simplebox">[[File:Help.png]] Not any string of characters may work. It is dependent of the question type. For example, a popup will be displayed for "startdate". For number-based questions, you may use signs such as ">=, <=, <, >" to better filter your data. For the "completed" column, a dropdown box is displayed if you click on "All" (default option), allowing you to filter your response table data according to the completion state of the responses and so on.</div>




==VV Export/Import== <!--T:193-->
<!--T:302-->
Once done, your table should look like the one below. Now, tick all the filtered responses, click on the '''Selected response(s)...''' button located in the bottom left side of the response table, and select the '''Export''' button:




===VV - Problems with vv import=== <!--T:194-->
<!--T:303-->
<center>[[File:Export group of responses 1.png]]</center>




<!--T:195-->
<!--T:304-->
If you have difficulties importing a vv file, try a Tab-delimited file and it should work fine.
The next page will be loaded:




==Other problems and solutions== <!--T:196-->
<!--T:305-->
<center>[[File:Export group of responses 2.png]]</center>




===Copying responses into a different survey (using tokens)=== <!--T:197-->
<!--T:306-->
# Create new survey, add a dummy response, export the response file, open in Excel. This creates the format for the new import file.
The '''Range''' column is not displayed since you have already selected the entries you wish to export. To check those IDs, check '''Selection''' (see the above screenshot). You can click on '''Reset''' if you wish to export all your data instead.
# Export the responses from the old survey, including tokens, open in Excel.
# Use this data to create an Excel worksheet for the standard token file import (eg. Firstname, Lastname, Token, Email address, Email status (OK), Language (En)). Save as .csv and import tokens to the new survey in LimeSurvey.
# In Excel, copy the response fields from the old survey responses that you want in the new survey (including token) into the appropriate Excel column of the new survey format.
# Save as .txt file.
# Use VVImport to import the new data into the new survey.
# Possible import errors include date format - some system date fields do not allow a NULL value, some do. If the date looks okay but gives an error, use the Excel cell format "2009-12-01".
</translate>
</translate>

Revision as of 17:40, 11 March 2019


Once your survey is active, you can start browsing responses and export them for further analyses. To access the export function, click on Responses (displayed on any survey-related panel) and then click on Responses & statistics from the dropdown menu.



The default page that is loaded is Response summary. Now, look for the Export option located on the top toolbar:



Several options are available:


Export responses

The following panel is displayed when the first export-related option is selected from the drop-down menu:



Several filter options are separated into:

  • Format: it allows you to select the format in which you wish to export your results. The following formats are available:
    • CSV File (all charsets): see also the "CSV field separator" option at the bottom of the Format tab. The default one is "comma". The other options are "semicolon" and "tab"
    • HTML
    • R (data file): if this option is chosen, please also export your survey into R (syntax file). To find out more details about how you can analyse your data in R, check this wiki subsection
    • Microsoft Word (latin charset)
    • Microsoft Excel (all charsets)
    • STATA (.xml): for more details on how to analyse your data in STATA, read the following wiki subsection
    • PDF
    • R (syntax file): if this option is chosen, please also export your survey into R (syntax file). To find out more details on how you can analyse your data in R, check this wiki subsection
  • General
    • Completion state: set to export all records OR completed records only OR incomplete records only. For more information on their meaning, check this wiki subsection
    • Export language: the default option is the base language of your survey
  • Range: refers to the id of the stored responses from the response table. In case the values you introduced are wrong (ie., no response id was found between the values you entered), a pop-up will be displayed when you will try to export the responses asking you to enter values that can be found in the table.


Range is not displayed if you wish to export only one response or a group of responses.


  • Responses
    • Export responses as: you can either export full answers or convert answer codes. If the later is selected, the answers submitted by your respondents will be replaced by the answer code of the respective answer. "Yes" and "No" answers will be converted to "Y" and "N" answers to any string of characters. If "Convert Y/N to" is enabled, then the answer codes that use Y and N as answers will be converted into the strings of characters from their corresponded boxes. By default, the values are 1 for Y and 2 for N.


To better understand the difference between full answer and answer codes, check the following wiki section.


  • Headings
    • Export question as: sets how the heading should look like in the exported file. The following options are available:
      • Question code
      • Abbreviated question text: the length of the question is decreased if this option is selected (useful if you work with long questions)
      • Full question text (default)
      • Question code & question text
    • Strip HTML code: enabled by default in order not to export the HTML used in question text boxes
    • Convert spaces in question text to underscores: disabled by default. If enabled, the spaces from the question text are converted to underscores.
    • Text abbreviated: disabled by default. If enabled, the question text will be abbreviated. The length of the question text is given by the number put into the "Number of characters". Please note that this option is useful in the case in which you wish to abbreviate the question texts resulted from selecting either "Full question text" or "Question code & question text" as heading text.
    • Use Expression Manager code: disabled by default. If enabled, the questions and subquestions will be exported as they are used within the ExpressionScript. Therefore, the heading would resemble the qcode variable naming. Please note that one of the following question heading options has to be chosen: "Question code" or "Question code & question text".
    • Number of characters: set up a maximum number of characters to be displayed in the headings. This option works if you wish to export your question as abbreviated question text. The default number is 15.
    • Code/text separator: select the option you wish to use to separate the question code from the text of the question. By default, it is a "dot" followed by an empty string (<SPACE>).
  • Column Control: sets the questions (and their corresponding answers) to be exported. The questions in this list are represented by their corresponding question code and question text. By default, all columns will be exported. To select multiple columns, use CTRL and/or SHIFT keys.
  • Token control - sets which survey participant data should be exported. This option is only available if your survey is not anonymous! Click here for more information on what a survey participant table is and how you can use it in LimeSurvey.



Export R

The free software environment R is an alternative for SPSS used for statistical computing and graphics.

Follow these steps to import your dataset in R:

  1. Download both the syntax file and data file
  2. Store both files in your R working directory (use getwd() and setwd() in a R command window to get and set your working directory)
  3. Enter source("File_name_syntax.R") in the R command window. It will import the data in the correct format to a data frame called "data".


You may also use RStudio (free open source solution) to work with your data in R in a nice and easy-to-understand GUI. By following the above guideline, your data should look like this:



Responses with limited options will be factored with the levels matching the code of the question and the labels matching the options.

Questions with "other" as an option will have the question field with _Other appended as a new column for the other data.

R-export is a plugin in LimeSurvey. If you cannot find the R-export options (R (syntax file), R (data file)) under Format, make sure the R-export plugin is enabled in the plugin menu.



Export STATA-xml

STATA is a commercial data analysis and statistical software package.

This export routine was created to facilitate rapid analysis of data collected with LimeSurvey. It creates an XML-file in STATAs proprietary format. This format offers several advantages over importing plain CSV files:

  • Data sets are fully labelled including variable labels (question, subquestion) and value labels (answers, if applicable).
  • Dates are already transformed to STATAs internal date format and thus can directly be used to calculate differences between days etc.
  • Variable names are, if necessary, converted to a STATA compatible format.
  • Data formats of variables (string, integer, float, etc.) are already set according to the underlying data (no more numbers encoded as strings!).

How to load the file in STATA:

  1. In STATA's menu, click on File, Import, xml-data
  2. Choose browse to navigate to your exported file and click 'OK'.
If you prefer STATA's binary .dta files, you can just save your data again in this format.


  Attention :
  • Due to a limitation in STATA's data format, the length of string (text) variables have a maximum of 244 characters (Stata versions 8-12) and 2045 characters (Stata version 13 and above). Please indicate your Stata version in the settings of the export plugin:




  • STATA only supports attaching value labels to numerical values. So, to achieve short answers (usually one or two digits) and have these properly labelled, one should use numerical answer-codes in LimeSurvey (1=Totally agree). If non-numerical answer codes are used (A=Totally agree), then the complete answer text will be used as answer (eg., 'Totally agree').



Export responses to SPSS

SPSS Statistics is a software package used for logical batched and non-batched statistical analysis. You can use the official SPSS package or GNU PSPP replacement for the proprietary program SPSS.

To export your response data to SPSS, go to Responses & statistics section and select the SPSS-corresponding option located under the Export menu:



The following page is displayed:



The following options are displayed in the panel:

  • Data selection: you can select which data should be selected for export: all responses OR only complete responses OR only incomplete responses
  • SPSS version: check your SPSS installation version. Two different export options can be chosen: prior to version 16 and 16 or up
  • Language: acts like a filter that allows you to filter the exported responses based on the language used to fill out the survey
  • Limit: type in any numerical value to get exported only the first "n" entries from your response table
  • Offset: type in any numerical value to get exported your response table without the first "n" entries from your response table
  • No answer: if left empty, an empty string is stored as answer for the questions that have not been answered by respondents. Type in this box any string of characters to replace the empty string. The set of characters will be displayed in the exported .dat file

SPSS export includes two files:

  1. a syntax file (survey_xxxx_SPSS_syntax_file.sps)
  2. and a data file (survey_xxxx_SPSS_data_file.dat).

After having downloaded these files you can open them using a raw text editor like notepad to take a look how the exported data looks like. The syntax file holds the commands that should be run to import the data. It is like a programming language inside SPSS. The .dat file contains a comma separated file with all data. We recommend you not to import your data as csv because there is the risk of loosing information about questions, label sets, and so on.


Import LimeSurvey responses to SPSS

To import your data to SPSS, pursue these steps:

  1. Download the data and the syntax file.
  2. Open the syntax file in SPSS in Unicode mode.
  3. Edit the 'FILE=' line and complete the filename with a full path to the downloaded data file.
  4. Choose 'Run/All' from the menu to run the import.
  5. Done


VVExport

Once you've begun collecting responses, there may be occasions where you need to be able to directly edit and modify large quantities of data from your responses table (where a spreadsheet tool may be more useful).

VVExport (the "VV" stands for vertical verification) allows you to export your responses table into a .csv file. So long as the general structure of the file remains intact, you can then edit values within it, and then import the file again into your responses table using the "VVImport" feature.


When do I need to use VVExport and VVImport?

It is often used in three scenarios:

  1. In the first one, it is used to combine large amounts of data in one LimeSurvey installation. Imagine that you run two similar surveys on two different machines. In order to combine the two response tables, you will have to use VVExport, VVImport, and a third-party app (e.g., spreadsheet apps) to combine your data and put it on one LimeSurvey installation.
  2. It may also be used to edit the response table of a survey. For small edits, you can access the response table and edit the desired answers. Still, for "macro-editing", VVExport and VVImport are recommended because a spreadsheet program can help you quickly edit dozens of responses at the same time.
  3. A "vv survey file" allows you to import the responses to a survey when the question/answer combinations have changed. Effectively, this allows you to add or remove questions in an active survey.
Attention! To add, remove or edit questions, you have to deactivate your survey, do the changes, and then activate it again. The old response table that was created as a result of the response table deactivation can be imported into the newly activated survey by selecting Import -> Import responses from a deactivated survey table. For more details, check this wiki subsection.


To export your data via VVExport, go to Responses & statistics section and select the VV-corresponding option located under the Export menu:



The following page will be loaded:



  • Survey ID:: The ID of the survey to be exported
  • Export: The completion state of the responses to be exported:
    • Completed responses only: if a respondent reaches the last page of a survey and clicks the Submit button, then his or her response is marked as being complete
    • Incomplete responses only: if a respondent does not click on that Submit button located before the end page, then the response is marked as being incomplete
    • All responses: export both completed and incomplete responses
  • File extension: The file extension. The file is a TSV (tab-separated values) file. For easy opening in MS-Excel set the extension to .txt. If you use LibreOffice, OpenOffice or any other spreadsheet program, you can leave it to .csv (default format)


The first two rows of the spreadsheet are the column labels. The first row is a "human readable" column heading that details the name of the question. The second row is the real column name (Internal DB- or Qcode-name) for that response.


  • VV export version: The 1.0 version (Old VV version) uses database column headers, version 2.0 (Last VV version) uses Qcode Variable Naming. Version 2.0 is selected by default if all of your question code are unique.


Last VV version allows different column names than the ones from the database. If your question codes are unique, then the new version is selected. In the new version each column name uses the Qcode Variable Naming. The update of surveys is easier in this way.


  Attention : Things you should be aware of:
  • If you want to import responses using "VVImport" make sure to check whether the responses should be added to the existing responses or all responses should be overwritten.
  • If you are trying to import responses from a different yet identical (e.g., identical questions/answers from another survey), make sure you are using the correct vv file and that the first two lines of the .csv file are correct.
  • If you import a survey to your LimeSurvey installation the SID will not change (if possible). The group id and question id however might change. So you might have to adjust the first two heading lines to match the new group id/question id.



Exporting a VV survey file

When you choose to export responses using VVExport, you will be given the option to choose whether you want to export all responses or complete responses only or incomplete responses only. The file extension allows you to choose which extension the exported file will have. For easy use, .csv should be chosen.

The first two rows of the spreadsheet/tab-delimited file are the column labels. The first row is a "human readable" column heading that details the name of the question/answer field. The second row is the internal PHP/database column name for that response.

You should not modify the first two rows of this spreadsheet if you want to be able to "import" the data back into LimeSurvey at a later point.

VV files structure - example

VV version 1 TSV file

Response ID	Date submitted	Last page	Start language	Token	please vote from 1 to 6 (1 - super, 6 - worst)
id	submitdate	lastpage	startlanguage	token	46492X40X1991
183	09.11.11 11:44	3	de	jsfhusdgqfygqsy	4
184	09.11.11 11:53	3	de	sdfhsifgsyergze	2
190	09.11.11 11:44	3	de	qsdqshkfhkdsjhj	1


VV version 2 TSV file

Response ID	Date submitted	Last page	Start language	Token	please vote from 1 to 6 (1 - super, 6 - worst)
id	submitdate	lastpage	startlanguage	token	QCODE
183	09.11.11 11:44	3	de	jsfhusdgqfygqsy	4
184	09.11.11 11:53	3	de	sdfhsifgsyergze	2
190	09.11.11 11:44	3	de	qsdqshkfhkdsjhj	1


In this example, the SQGA identifiers are not used - instead, the Qcode variable naming QCODE is used in the second line.

To understand the difference between SGQA and Qcode, please check the following two wiki sections:

We generally recommend our users to use question codes since they are much easier to be used (it represents an addition to the SGQA system used in the earlier versions of LimeSurvey.


Reserved names

A .vv file uses left and right brackets for reserved names. When importing, this string is replaced by:

  • {question_not_shown} : NULL value in database. LimeSurvey uses [empty string] for not answered question, and NULL value for questions not shown.
  • {quote} : " (a double quote)
  • {cr} : Carriage return
  • {newline} : A new line
  • {lbrace} : Left bracket (for example, if you want to have {cr} in response : use {lbrace}{cr} )

Editing a VV survey file

When a .vv file has been successfully exported you can use a spreadsheet tool to open and edit the file. If you have to choose a column separator when opening the file please use the "Tab" character. If you are using non-ASCII characters make sure you set "UTF-8" as character set.


  If you are using Microsoft Excel to edit the exported vv file, you should know that Excel destroys the original data structure of the file. This causes an error when you try to reimport the edited .vv file. The workaround is to save as a .txt file once you edited the data from the .csv file. If you save as .csv, Excel uses comma-delimits which will not import into LimeSurvey. By saving as a .txt file, Excel saves as a tab-delimited file which can be imported into LimeSurvey. For other Excel-related issues, check this wiki subsection.


If you simply wish to simply edit your data, then be careful at the first two columns so that you can later easily VVImport your data back into your LimeSurvey installation!

If you combine data from two different surveys, please note that the old VV version uses SGQA which will most probably give you different "question ids". Therefore, be careful how you merge the data!

The alternative would be to use the last VV version because question codes can be constant throughout different LimeSurvey installations (if you use the same survey structure across multiple LimeSurvey instances).

When importing the VV file, if two response IDs match and the Exclude record IDs is disabled, you can make LimeSurvey:

  • Report and skip the new record
  • Renumber the new record
  • Replace the existing record
  • Replace answers in file in the existing record
For more information on how to import a VV file, check the following wiki subsection: Import a VV survey file.

Other export options

In case you do not need to export the whole survey, you can also choose to export only:


Export a single response

If you want to export an individual response, you can do it in two ways:

1. Login to LimeSurvey, choose your survey, click on Notifications & data tab and make sure you receive basic email notifications:



Every time someone has completed a survey, you will receive an email with a link: "Click the following link to see the individual response". This will take you to a page with a button above the response data saying "Export this response":



Choose how the single response will be exported:



You can observe that no Range export option is displayed since you export only one answer


2. Login to your LimeSurvey installation/instance, choose your survey. Select tab Responses located under the settings tab:



Responses and statistics options are displayed under the settings tab only if the survey is not deactivated.


See the "action" column. Hover the mouse over each option and see which one allows you to see the response details (the first button):



The response entry will be loaded. Click on the "Export this response" button. You will be redirected to a panel from where you can select how the exported file should look like:





As you can observe, you can also export the response as a pdf file:



This option is usually needed when you wish to share to one of your respondents his/her results. In the case in which you wish to share only certain parts of his/her answer, check the pdf export option located in the Statistics panel. In this way, you can hide your hidden questions and/or different assessments you run "in the background".


Export a group of responses

This option is useful in the case in which you wish to export a certain group of filtered responses.

To do it, access your Responses table table:



Responses and statistics options are displayed under the settings tab only if the survey is not deactivated.


You can either order the responses according to the value from each column by clicking on the column label or you can type in the empty boxes located below the column labels a string of characters according to which you wish your data to be filtered to.



Not any string of characters may work. It is dependent of the question type. For example, a popup will be displayed for "startdate". For number-based questions, you may use signs such as ">=, <=, <, >" to better filter your data. For the "completed" column, a dropdown box is displayed if you click on "All" (default option), allowing you to filter your response table data according to the completion state of the responses and so on.


Once done, your table should look like the one below. Now, tick all the filtered responses, click on the Selected response(s)... button located in the bottom left side of the response table, and select the Export button:



The next page will be loaded:



The Range column is not displayed since you have already selected the entries you wish to export. To check those IDs, check Selection (see the above screenshot). You can click on Reset if you wish to export all your data instead.