Best Practice for PHPExcel

Topics: Developer Forum
Jul 23, 2014 at 11:54 AM
Edited Jul 23, 2014 at 3:22 PM
Hi, I would like to know if the following excel sheet is possible via PHP/MySQL using PHPExcel 1.7.9 .

Image

I have been struggling for days to try and get this design but it doesn't seem possible where "Lesson 1-5" header columns is dynamic data and the result indicators (1,0) is row based per user. The actual report's data is inaccurate using this design and not practical.MySQL doesn't group data like this and I have tried using PHP arrays etc and all control structure possible.

Any advice would be appreciated.
Coordinator
Jul 27, 2014 at 7:16 PM
The problem doesn't lie with PHPExcel, it's perfectly capable of creating a spreadsheet that looks like this. The problem lies in how you generate the data from your database.
Jul 29, 2014 at 7:11 AM
Edited Jul 30, 2014 at 10:01 AM
Thank you for your reply. I thought as much and that is my concern. I have tried various loops to be able accurately get it to work but it's total disaster when matching results to users.

The above works with accurate data when the lessons are actual rows under 1 column header which then aligns with matching the correct learner.

Seems like the above is not going to happen accurately? Design wise yes, without any consideration for the data... not a good idea.