Welcome to the LimeSurvey Community Forum

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

How to export all surveys at once using the Exporting results function

  • yuto0419
  • yuto0419's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 week 14 hours ago - 1 week 14 hours ago #265397 by yuto0419
Please help us help you and fill where relevantlease help us help you and fill where relevant:
Your LimeSurvey version: 5.6.9+230306
Own server or LimeSurvey hosting:Own server(Azure)
Survey theme/template:fruity
==================
Is there a way to export all surveys at once using the Exporting results function?
I would like to export them with column control set.

If the above is difficult, is it possible to implement a regular batch by calling the Exporting results function ("application\controllers\admin\Export.php exportresults"?) with your own PHP?


We need to regularly submit response data in a CSV file specified by the customer.
Until now, we have dealt with this issue by creating a view table that limits the items we want to output from the lime_survey_xxxxxx table in the database, but because the content of the questions and the format of the CSV file specified by the customer change regularly, we have had to recreate the view table each time.
This would be done for all 12 surveys, which would be extremely inefficient.


I recently learned about the Exporting results function and would like to ask about it as I believe it may help improve our inefficient work.
Last edit: 1 week 14 hours ago by yuto0419.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 11 hours ago #265410 by Joffm
Hi,
what about using the API?
[url] manual.limesurvey.org/RemoteControl_2_API [/url]
with these methods
[url] api.limesurvey.org/classes/remotecontrol-handle.html [/url]

And you can define the columns you want to export (php example)
Code:
...
$surveyResponses = $myJSONRPCClient->export_responses(
    $sessionKey,
    $survey_id,
    'csv',            // 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','token','submitdate','lastpage','interviewtime','email','159677X490time','159677X487time','159677X490X9219SQ001','159677X490X9221SQ001']
);
...
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose