how to achieve the following table in excel or HTML.
+----+----+----+----+----+----+----+----+----+----+----+----+
|a |b |c |a |b |c |a |b |c |a |b |c |
+----+----+----+----+----+----+----+----+----+----+----+----+
EDIT FOR REAL CASE:
So I want to print Rit
, Liter
, and Volume
respectively in ms Excel for about 15 times. let say Rit
will occupy column E1, Liter
on F1, Volume
G1..repeat 15 times.
heres is my code so far:
$i = 0;
$j = 1;
foreach($this->cellRange('E', 'AY') as $col){
if($i % 3 == 2){
if($j > 15){
$sheet->setCellValue($col.'5', 'Total');
}else{
$sheet->setCellValue($col.'5', $j);
}
$sheet->setCellValue($col.'6', 'Volume');
$j++;
}else if($i % 2 == 1){
$sheet->setCellValue($col.'6', 'Liter');
}else{
$sheet->setCellValue($col.'6', 'Rit');
}
$i++;
}
$this
refer to current object (Laravel controller), while $sheet
refer to PHPExcel sheet object.