Importa le risposte
From LimeSurvey Manual
Introduzione
La funzione importa risposte si riferisce alla capacità di LimeSurvey di importare e visualizzare le vecchie risposte nella propria Tabella delle risposte. Alcuni scenari in cui potresti usarlo:
- desideri combinare tutti i tuoi dati raccolti in due o più istanze di LimeSurvey in un'unica istanza di LimeSurvey. Questo di solito viene fatto per avere una prospettiva migliore su tutte le risposte che desideri analizzare ulteriormente.
- alcune domande non sono impostate sul tipo giusto. Poiché LimeSurvey non consente di modificare il tipo di domanda finché il sondaggio è attivo, dovrai disattivarlo. Disattivandolo, una tabella di risposta viene creata e memorizzata nel database associato alla tua installazione di LimeSurvey. Una volta terminate le modifiche, riattiva il sondaggio e reimporta le tue risposte dal vecchio database delle risposte.
- si desidera modificare in batch più righe in un software per fogli di calcolo e successivamente importarle nuovamente nell'installazione. Questo di solito è il caso in cui hai cambiato un tipo di domanda e desideri "adattare" le vecchie risposte memorizzate al nuovo formato.
Per accedere alla funzionalità di importazione, seleziona Risposte e statistiche dalla barra degli strumenti principale (visualizzata su qualsiasi pannello relativo al sondaggio) e quindi fai clic su Risposte:

Verrà caricata la pagina predefinita, Riepilogo risposte. Ora cerca l'opzione Importa situata nella barra degli strumenti in alto:
Sono disponibili due opzioni di importazione:
Importa
Importa risposte da una tabella di sondaggio disattivata
Una volta cliccato su Importa risposte da una tabella di sondaggio disattivata, verrà caricata la seguente pagina:
In questa pagina sono selezionabili due opzioni:
- Tabella sorgente: seleziona la tabella che desideri importare. Si prega di notare che le tabelle possono trovarsi nella scheda compatibile o nella scheda compatibile con tipo di coercizione. Continua a leggere di seguito per capire qual è l'ultima opzione e i possibili rischi di tipo che forza una tabella di risposta.
- Tempi di importazione (se esistenti): i tempi non vengono visualizzati nella tabella delle risposte ma nella tabella dei tempi. Se abilitato, verranno importati anche i tempi.
Nella seconda parte della pagina, viene visualizzato un messaggio di avviso che indica come viene determinata la compatibilità tra due tabelle di risposta (tra quella attuale e la vecchia/seconda).
Puoi importare tutte le vecchie risposte compatibili con il tuo sondaggio attuale. La compatibilità viene determinata confrontando i tipi ei nomi delle colonne, il campo ID viene sempre ignorato.
Usare la coercizione del tipo può danneggiare i tuoi dati; usare con cura o per niente se possibile.
LimeSurvey rileva e gestisce le seguenti modifiche:
- La domanda è stata spostata in un altro gruppo (il risultato è stato importato correttamente).
- La domanda viene rimossa dall'obiettivo (il risultato viene ignorato).
- La domanda viene aggiunta all'obiettivo (il risultato è impostato sul valore predefinito del database).
Importa un file di sondaggio VV
Se fai clic sul pulsante Importa un file di sondaggio VV, verrà caricata la seguente pagina:
- Response data file: select the file to be uploaded from your machine. The accepted file formats are : *.csv, *.vv, *.txt.
- 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 (displayed if exclude record IDs is disabled, see the above screenshot):
- skip: report and skip the new record. After upload you will see if the record already existed - if it did 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.
- 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.
- Import as not finalized response?: if checked, the submitdate is set to NULL - 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: iy default, VV file's first line contains the human readable question, the real column names being located on the second line. Basically, the first line contains the real column names.
- Force import: if the question codes are not found in the database name or in Qcode Variable Naming, then columns are assigned depending of order. This can be used to import the VV file from different LimeSurvey instance. Regardless of this, each survey must be exactly the same. We strongly recommend to use this option only if you know what you are doing. It can be very dangerous - the results can end up in the wrong column.
Reserved names
The reserved names are located between left and right brackets. When the .VV file is imported back into LimeSurvey, the strings are being replaced with:
{question_not_shown}: NULL value in database. LimeSurvey uses [empty string] for questions that were not answered and NULL value for questions that have not been shown (e.g., when using the ExpressionScript).{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})
Potential issues & solutions with the VV file
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 edits.
- 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 text editor like notepad (or anything similar).
- 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 text editor and press CTRL + A to mark all 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 (in .csv format).
- Try now to import this file.