I would like to write into a csv file using PHPEXCEL in the following format. The class in bold and a space after every class group.

But i have not been able to find a way to do it.
Here is what I could do.

I generate the data from an sql and loop thought it. Here is my code
$sql="SELECT * FROM table ORDER BY typeclass";
$query=mysql_query($sql);
$check='';
$i=1;
while($row=mysql_fetch_assoc($query))
{
if($row['class']!=$check)
{
$objPHPExcel->getActiveSheet()->setCellValue('A'.$i,$row['Class']);
$check=$row['class'];
}
$objPHPExcel->getActiveSheet()->setCellValue('B' .$i,$row['Name']);
$objPHPExcel->getActiveSheet()->setCellValue('C' .$i,$row['score']);
$i++;
}
Can anyone help me get the desired output.
How to format a cell bold:
You can insert a new Row after inserting the class name.
Then you can put the name and score into column A and B:
That should do all the trick. For further questions using PHPEXCEL youre able to contact me via email.
By the way, poor Simon 🙁