如何制作这样的表格,使用phpexcel,以及动态的日期和月份?
答案 0 :(得分:0)
$excelData[] = ['Report'];
$data = $user->get();
$grandTotal = 0;
$verticalCount = [];
$verticalCount['S. No'] = '';
$verticalCount['Name'] = 'Total';
$keys = [];
foreach($data as $d=>$k){
$_excelData = [
"S. No" => $d + 1,
"Name Of Admin" => $k->name
];
//$dates containing date of given time period
foreach ($dates as $date) {
$_excelData[$date] += 1;
$verticalCount[$date] += 1;
}
}