How generate excel for this customized report?

Mar 15, 2015 at 3:28 AM

I have created a table(attendance_details) for storing every day attendance of Students in MySQL. Need to capture attendance for hourly(1-8hrs) for every day. I have the student details in separate table(Student_details). As of now fields created in attendance_details are attendance_No(Foreign_key) which is primary key in student_details table, Date, hour1, hour2, hour3, hour4, hour5, hour6, hour7, hour8. i need the report for each day attendance based on hours of a all students in a class for every month? Front end is C#. Also need to keep track of every hour attendance, can you help me in this in which the excel should generate report as below. Any help in this regard will be appreciated.

For IMAGE of Excel Report format and MySQL db fields click the link