Hi Janet,
Had a chance to have a more detailed look but just can't see clearly which variable stores the current column number in the function get_headerhtml().
If we knew which, then would simply store this value in an array (could just change var $col = '' to var $col = array(); to set this up) when we hit 'Summary Attendance' and and when we hit 'Attendance' whilst in the function get_headerhtml().
Then, when we are the function get_studentshtml(), we could merely test whether the current column is in this array().
$columncount seems to be a candidate, but it is potentially incremented so many times within a single loop (using the ++ format), that is not clear at all what this actually represents.
However, you could do a test on the basis that $columncount IS the right one.
I've attached a modified file ... the crucial lines are 62, 607-616 and 725-873. In the last chunk, all the real changes is in the line 727 - all the rest is just indented code.
If it works, we've been lucky. If not, maybe it'll help you to find the right variable anyway.
Cheers
P
EDIT: forgot to attach the file - it's there now!