Welcome to the LimeSurvey Community Forum

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

Error in spss export (text fields)

  • fransmarcelissen
  • fransmarcelissen's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 9 months ago - 8 years 9 months ago #121600 by fransmarcelissen
Error in spss export (text fields) was created by fransmarcelissen
I use the lastest build of limesurvey (Version 2.05+ Build 150520)
I have problems with export of text fields to spss. I have a simple short text field named "arts" (docter in duch). Here participants fill in the name of their docter. When I export this field to spss, the export module generates the following syntax:

GET DATA
/TYPE=TXT.
.
.
/VARIABLES=
.
.
V26 F1
.

RENAME VARIABLE ( V26 = Arts ).

so arts incorrectly becomes a one-digit numerical variable. This could be correct if the string values would correspond with var labels, but this is not the case. Is this an error? This does not always happen. I had the impression that this happens if the first case is empty, but that is not so. In some cases the incorrect datatype is not F1 but A1

What I do as a workaround is that I change "v26 F1" into "v26 A16".
Then everything works fine.

Does others have the same problem? Is there a real solution for this?
Last edit: 8 years 9 months ago by fransmarcelissen.
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 9 months ago #121634 by tammo
Replied by tammo on topic Error in spss export (text fields)
We also encountered problems in SPSS output. Not only field codes are wrongly coded, but also when you use extra fields in the token table, the SPSS goes completely out of hand.

We solved this by adapting the export_helper.php file and submitted this for being taken up in LimeSurvey core. Until now this has not happened, I guess I still have to describe what we have done.

Just try is this helps you. The unzipped file should go into /application/helpers


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The following user(s) said Thank You: fransmarcelissen
The topic has been locked.
  • fransmarcelissen
  • fransmarcelissen's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 9 months ago #121635 by fransmarcelissen
Replied by fransmarcelissen on topic Error in spss export (text fields)
Thanks Tammo.
Your solution works very well.
Frans Marcelissen, DigiPsy, Leende
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 9 months ago #121636 by tammo
Replied by tammo on topic Error in spss export (text fields)
Thank you for testing it. Which version of LS do you use?


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • fransmarcelissen
  • fransmarcelissen's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 9 months ago #121637 by fransmarcelissen
Replied by fransmarcelissen on topic Error in spss export (text fields)
I tested it on Version 2.05+ Build 150520. This is my testing site. I will install and test it om my production site later. I hope it soon will be integrated in the core source.
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 9 months ago #121638 by tammo
Replied by tammo on topic Error in spss export (text fields)
github.com/LimeSurvey/LimeSurvey/pull/296#issuecomment-89249966

I asked mfaber to assist me, because I feel like being in a deadlock: I have to test something I have never used...


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • fransmarcelissen
  • fransmarcelissen's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 9 months ago #121639 by fransmarcelissen
Replied by fransmarcelissen on topic Error in spss export (text fields)
I use limesurvey with r and spss every day. If you need someone to test these kind of things, pleas contact me.
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 9 months ago #121640 by tammo
Replied by tammo on topic Error in spss export (text fields)
Well, a first check could be: does anything go wrong when exporting to R when you use this new export_helper.php?

But mfaber asked to test with STATA, do you use that also?


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • fransmarcelissen
  • fransmarcelissen's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 9 months ago #121641 by fransmarcelissen
Replied by fransmarcelissen on topic Error in spss export (text fields)
I do'nt use stata. exporting to R works fine.
But to be honest: I normally don't use this way of importing into R, I alway read the data of limesurvey directly into r using mysql or rpc2.
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 9 months ago #121642 by tammo
Replied by tammo on topic Error in spss export (text fields)
OK, thanks. I'll ask around at the forum...

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
More
8 years 9 months ago #121646 by jelo
Replied by jelo on topic Error in spss export (text fields)
Is that a bug only related to question type short text? Or is the complete spss export wrong?
Seems to be a bug related to Build 150520.
2.06 has been marked stable. Not sure if a fix will be redistributed for 2.05.

What is the bugtracker id for this bug report?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 9 months ago #121647 by tammo
Replied by tammo on topic Error in spss export (text fields)
We did not enter a bug report, we just offered a fix via Github. We will check if the bug still exists.

BTW: it was first encountered in the 150211 build, but it may have existed before that.


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose