Automating Export of Limesurvey Responses

More
6 years 5 months ago #54569 by rvenkat
rvenkat created the topic: Automating Export of Limesurvey Responses
I would like to know if there is way to export survey responses automatically into a separate program (which does data analysis)?

I want to automatically get responses at periodic intervals. I would like to configure survey ID, start and end dates for the period.

Currently, I am able to manually get data in CSV. Can we automate this process?

Has anyone tried doing this? Your suggestions/experience would be greatly appreciated.

Please Log in to join the conversation.

More
6 years 4 months ago #54615 by DenisChenu
DenisChenu replied the topic: Automating Export of Limesurvey Responses
LimeSurvey use database, you can use a php script (or another langage) to extract the answer from the database, and export like you want with a cron job.

You can have a look at admin/export.php to have some function to use for your script.

But you need to develop you own solution.

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).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: rvenkat

Please Log in to join the conversation.

More
6 years 4 months ago #54635 by rvenkat
rvenkat replied the topic: Automating Export of Limesurvey Responses
Thank you. I will look into it.

Please Log in to join the conversation.

More
6 years 4 months ago #54636 by rvenkat
rvenkat replied the topic: Automating Export of Limesurvey Responses
Did you mean admin/exportresults.php?
Thanks.

Please Log in to join the conversation.

More
6 years 4 months ago #54638 by DenisChenu
DenisChenu replied the topic: Automating Export of Limesurvey Responses

rvenkat wrote: Did you mean admin/exportresults.php?
Thanks.

I don't look, but i think it's a good start.

And i think you can have a look to a search site (like google) with

PHP Script Export MySQL CSV


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).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
6 years 4 months ago #54643 by Luke
Luke replied the topic: Automating Export of Limesurvey Responses

Shnoulle wrote: LimeSurvey use database, you can use a php script (or another langage) to extract the answer from the database, and export like you want with a cron job.


No, it will not be that easy. LS does not store actual values in the tables, but the codes. The codes link to other tables with actual values.

My survey has over 400 questions. Most of them are dropdowns. Doing what you suggested manually is just not practical.
The following user(s) said Thank You: r0bis

Please Log in to join the conversation.

More
6 years 4 months ago #54644 by holch
holch replied the topic: Automating Export of Limesurvey Responses
well, I think what Shnoulle wants to say is, that there is a export of results to csv which uses the exportresults.php. If you want something different than that, then the best way would be to have a look at the exportresults.php to see how it is done and then customize something for your specific needs.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
6 years 4 months ago #54645 by Luke
Luke replied the topic: Automating Export of Limesurvey Responses

holch wrote: well, I think what Shnoulle wants to say is, that there is a export of results to csv which uses the exportresults.php. If you want something different than that, then the best way would be to have a look at the exportresults.php to see how it is done and then customize something for your specific needs.


And for someone already familiar with the code, how hard would it be to write

cmdline_export_survey_data_csv.php

;)

Please Log in to join the conversation.

More
6 years 4 months ago #54647 by holch
holch replied the topic: Automating Export of Limesurvey Responses
Well, I assume if Shnoulle would know it, he would have said so, don't you think. Not everyone who is somehow involved with LS knows every function and every bit of it. As far as I know, everyone has some kind of speciality.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
6 years 4 months ago #54655 by DenisChenu
DenisChenu replied the topic: Automating Export of Limesurvey Responses

holch wrote: Well, I assume if Shnoulle would know it, he would have said so, don't you think. Not everyone who is somehow involved with LS knows every function and every bit of it. As far as I know, everyone has some kind of speciality.

Yep,

I never work on a function like this , i think it was 'some' hour of working :).

And Luke, your right, you need to link the table 'lime_survey_xxxx' with question and answer to do the job. I think, if i work on it, to look at the existent function, and include common.php, exportresult.php etc ... can be interesting.

Some of us offer professionnal support if you want :).

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).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now