Welcome to the LimeSurvey Community Forum

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

Automating Export of Limesurvey Responses

  • rvenkat
  • rvenkat's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
13 years 10 months ago #54569 by rvenkat
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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
13 years 10 months ago #54615 by DenisChenu
Replied by DenisChenu on 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 support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: rvenkat
The topic has been locked.
  • rvenkat
  • rvenkat's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
13 years 10 months ago #54635 by rvenkat
Replied by rvenkat on topic Automating Export of Limesurvey Responses
Thank you. I will look into it.
The topic has been locked.
  • rvenkat
  • rvenkat's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
13 years 10 months ago #54636 by rvenkat
Replied by rvenkat on topic Automating Export of Limesurvey Responses
Did you mean admin/exportresults.php?
Thanks.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
13 years 10 months ago #54638 by DenisChenu
Replied by DenisChenu on 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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
13 years 10 months ago #54643 by Luke

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
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
13 years 10 months ago #54644 by holch
Replied by holch on 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 answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
More
13 years 10 months ago #54645 by Luke

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

;)
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
13 years 10 months ago #54647 by holch
Replied by holch on 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 answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
13 years 10 months ago #54655 by DenisChenu
Replied by DenisChenu on 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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
13 years 9 months ago #55947 by Luke
Hello, finally I wrote "cmdline_exportsurvey.php" and it works.

Where is the best place to upload the files and describe how to use it?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
13 years 9 months ago #55956 by DenisChenu
Replied by DenisChenu on topic Automating Export of Limesurvey Responses
Hello,

I think there are 2 possibility, and the 2 can be done.

1st: workaround part in docs.limesurvey.org
2nd: UserPatch bugs.limesurvey.org

:)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose