0

I have 3 tables data named survey, survey_questions and survey_answers. where questions and answers are in the form of json data type where each question and answer have unique option ids.

Now, I have to write this data into excel in the following format(for more details pls click the links):

first row will have all questions along with its options from second row, all the answer records should be populated.

Note:There are different question types in the survey like ranking,arrays,check box,radio etc...

Links for sample data: https://drive.google.com/open?id=1TVc16HSlLq_Di-YmRTC_RPBBLC1tpbQQ https://drive.google.com/open?id=1w2VXnVYVZONo2YUdn_Vy_GOzdtjbWh4j https://drive.google.com/file/d/1URIA0X5mYTxXItLKf3vswPqHxL45szIZ/view?usp=sharing

output of generated excel: https://drive.google.com/open?id=1BaM74WX6u74ZsKoDK45gJrbbBJ9Wm_Gr

nikhil
  • 1
  • 1
  • 1
    What have you tried so far? Can you provide a minimal code ? – ma3oun May 05 '19 at 08:59
  • I have solved this problem by doing some array processing before inserting data into excel itself.Basically, I formed required data in array and in for loop, appended html data using the data and then generated excel using phpspreadsheet – nikhil Jul 24 '19 at 10:32
  • 1
    You can answer your own question if you think it would help others. – ma3oun Jul 24 '19 at 10:39

0 Answers0