Welcome, Guest
Username: Password: Remember me

TOPIC: Prefill answers from csv file

Prefill answers from csv file 2 years 9 months ago #69987

Hello, I would like to pre fill the answers to a series of questions from information contained in a csv file. The survey is an open survey that does not use tokens. Is there any way to do this?
Thanks.
The administrator has disabled public write access.

Re: Prefill answers from csv file 2 years 9 months ago #69992

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4139
  • Thank you received: 767
  • Karma: 348
You can use AJAX and/or the js-tables (code.google.com/p/js-tables/CSV) plugin to import the CSV data. The details of a script to handle the imported data would depend on your question types and CSV contents.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Prefill answers from csv file 2 years 9 months ago #69994

Thanks. The question types are all array text questions. The csv is comprised of 5 columns with no header. The leftmost column contains the data that is used to define the reference point for the other columns. For example (column 1 and 4 data is surrounded by quotes):

"row1",row1info1,row1info2,row1info3,"row1info4"
"row2",row1info1,row1info2,row1info3,"row1info4"
"row3",row1info1,row1info2,row1info3,"row1info4"
"row4",row1info1,row1info2,row1info3,"row1info4"

A modification to the Edit Text Elements page enables us to generate a csv file containing the above content. We need to be able to read that content back into survey responses.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.110 seconds
Donation Image