Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Export to spss delimiter issues

  • Freewheelin
  • Freewheelin's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 month ago #104634 by Freewheelin
Export to spss delimiter issues was created 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.

Becomes:

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.:
/Variables=
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.

So:

- 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.
The topic has been locked.
  • Freewheelin
  • Freewheelin's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 month ago #104663 by Freewheelin
Replied by Freewheelin on topic Export to spss delimiter issues
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:
/qualifier="'"

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

So how do I get Limesurvey to export to spss form using the double quote qualifier?
The topic has been locked.
More
10 years 1 month ago #104786 by mfaber
Replied by mfaber on topic Export to spss delimiter issues
Seems the ' needs to be properly masked during export. This is probably a bug which you should report in LS's bug tracker.
www.limesurvey.org/en/community-services/bug-tracker

Changing the qualifier will likely only shift the problem towards variables containing ".
The topic has been locked.
  • Freewheelin
  • Freewheelin's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 11 months ago #107391 by Freewheelin
Replied by Freewheelin on topic Export to spss delimiter issues
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:

/QUALIFIER="'" /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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 11 months ago #107398 by DenisChenu
Replied by DenisChenu on topic Export to spss delimiter issues
@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.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose