Export to spss delimiter issues

3 years 1 month ago #104634 by Freewheelin
I am exporting data in spss format to take into PSPP.

In Limesurvey I have in the advanced settings for each question specified the variable type e.g. nominal, scale or ordinal. I cannot specify that a question answer is text.

All the difficult stuff seems to have gone OK and when I run the .sps file there are no errors and the .sps file is all pink where it should be showing that variables have been defined properly.

However where some of the variables are text then I have this issue:

Where a respondee has used a truncation the answer has been split into two for example.

Like coming to work. We're all happy working here.


Like coming to work. We

And the next bit is shunted along into the next variable column which is a likert scale and the rest of the data is all shunted along into the wrong variables for that respondee. Have the issue to with the variable surname if we have O'Leary.

(Respondees who have not used truncation have all their data against the right variable headings which makes me think that everything has mostly gone right with the export.)

The apostrophe in the we're is being read as a delimiter.

Now the in the .sps:
/delimiters="," i.e. a comma
/Qualifier="" as I believe it should be.

And all the variables are properly shown as being numbers or text e.g.:
V20 A15
V21 A255
V22 F1
V23 F1
V24 F1
V25 F1

e.g. V20 is text 15 characters max, V22 is a scale etc.

However in the .dat file I notice that data is shown as:
'5','like coming to work. We're all happy here.','3',

And seems to be using apostrophes as the qualifier which is causing the problem. I expected it to be double quotes:
"5","like coming to work. We're all happy here.","3",

When I export to csv I can choose which items I want to export and can leave out the free text answers. However spss format would be best as it keeps not only the question codes as variables but also the associated question text as a variable label which will be great for making graphs and cross tab tables meaningful. E.g. rather than just MS1 I will have MS1 Management style.


- at export to spss what have I done wrong as there are not that many options.
- is the fact I have a UK keyboard set to UK ansi causing the problems (since the @ and " are swapped between keys)
- is there a way of exporting to spss with only the numeric questions
- in Limesurvey can I tweak the spss export in some way to use the double quote "" qualifier in the .dat file and not single quote ''.

Any help appreciated.

Please Log in to join the conversation.

3 years 1 month ago #104663 by Freewheelin
A quick update, it does seem to be the qualifier used in the .dat file which is a single quote '.

In the sps file the qualifier is set as this also:

When it seems that spss normally uses a double quote as the qualifier:

So how do I get Limesurvey to export to spss form using the double quote qualifier?

Please Log in to join the conversation.

3 years 1 month ago #104786 by mfaber
Seems the ' needs to be properly masked during export. This is probably a bug which you should report in LS's bug tracker.

Changing the qualifier will likely only shift the problem towards variables containing ".

Please Log in to join the conversation.

2 years 11 months ago #107391 by Freewheelin
After finding that with update to 2.05 you still with spss export cannot leave out the qualitative data I reread the PSPP manual and the solutions is this, after the /qualifier command you add the word ESCAPE:


And truncations like we're not longer cause problems.

ESCAPE is a PSPP command and I am not sure if SPSS has an equivalent.

Please Log in to join the conversation.

2 years 11 months ago #107398 by DenisChenu
@Freewhelin : not sure it's a bug here but :

A bug not reported is a bug not corrected.

If there are difference between SPSS and PSPP (I don't think so), then you can do a export plugin taking SPSS export plugin from start.


Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.