- Posts: 69
- Thank you received: 3
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Hm, I tried that but it doesn't seem to work. If I export without setting fields, I'm getting something like this as a json:Export the some data and see what you have as column names. Those should be the identifiers used in the API call.
"id": 11, "submitdate": null, "lastpage": 42, "startlanguage": "de", "seed": "786809226", "token": "txxxxx", "startdate": "2024-04-30 13:32:52", "datestamp": "2024-04-30 13:43:00", "SH01[x]": "10",
"id": 11, "submitdate": null, "lastpage": 42, "startlanguage": "de", "seed": "786809226", "token": "txxxxx", "startdate": "2024-04-30 13:32:52", "datestamp": "2024-04-30 13:43:00", "SH01[x]": null, "326961X209X1790time": null,
Please Log in to join the conversation.
Please Log in to join the conversation.
$surveyResponses = $myJSONRPCClient->export_responses( $sessionKey, $survey_id, 'json', // Document type : pdf,csv,xls,doc,json null, // Language code : null : default from survey 'complete', // Stautus complete|incomplete|all NULL, // Heading : code|full|abbreviated : question text, default code NULL, // answer : short|long , default : long 1, // From Response ID 30000, // To Response ID ['id','973111X3474X42337','973111X3474X42338','973111X3475X42339','interviewtime','973111X3474time','973111X3475time','973111X3476time'] );
That also results in fieldnames like SH01[x]. I've also tried the SPSS version (which would be SH01_x) but that also doesn't work.Export the data to Excel via the GUI not via the API.
Group by group.how is your survey displayed ("group by group" ofr "question by question")?
So, please, create a small prototype, send the lss export and your script to export this.
$surveyResponses = $myJSONRPCClient->export_responses( $sessionKey, $survey_id, 'json', // Document type : pdf,csv,xls,doc,json null, // Language code : null : default from survey 'complete', // Stautus complete|incomplete|all NULL, // Heading : code|full|abbreviated : question text, default code NULL, // answer : short|long , default : long 1, // From Response ID 30000, // To Response ID ['id', 'submitdate', 'lastpage', 'startlanguage', 'seed', 'startdate', 'datestamp', '758878X3477X42341', '758878X3477X42342SQ001', '758878X3477X42342SQ002', '758878X3477X42342SQ003', '758878X3478X42343', 'interviewtime', '758878X3477time', '758878X3478time'] );
Thank you very much for your explanation! With this I managed to figure out my problem. This was three fold:Hi,
if you use SGQA syntax I do not see an issue.
I admit this is php (I have not the least knowledge of python), but I assume that your python code is correct.
Code:$surveyResponses = $myJSONRPCClient->export_responses( $sessionKey, $survey_id, 'json', // Document type : pdf,csv,xls,doc,json null, // Language code : null : default from survey 'complete', // Stautus complete|incomplete|all NULL, // Heading : code|full|abbreviated : question text, default code NULL, // answer : short|long , default : long 1, // From Response ID 30000, // To Response ID ['id', 'submitdate', 'lastpage', 'startlanguage', 'seed', 'startdate', 'datestamp', '758878X3477X42341', '758878X3477X42342SQ001', '758878X3477X42342SQ002', '758878X3477X42342SQ003', '758878X3478X42343', 'interviewtime', '758878X3477time', '758878X3478time'] );
Here the data of the last participant and everything displayed as table
Joffm
Please Log in to join the conversation.
"326961X223X1637x": { "fieldname": "326961X223X1637x", "type": "F", "sid": 326961, "gid": 223, "qid": 1637, "aid": "x", "sqid": 1807, "title": "SA02", "question": "<p>Was \u00fcberwiegt: Herausforderungen oder Chancen?</p>\r\n", "subquestion": "", "group_name": "[VI-SA02] Aktuelle Stimmung und Ausblick", "mandatory": "N", "encrypted": "N", "hasconditions": "N", "usedinconditions": "N", "questionSeq": 48, "groupSeq": 37, "preg": null, "SQrelevance": "1", "relevance": "1", "grelevance": "", "other": "N", "help": "" },