php-excel-templator
php-excel-templator copied to clipboard
too many rows
I am generating an excel and in the parameters I pass an array with 60 items but the excel is generated with approximately 500 unnecessary rows my code: `$academicperiods = Academicperiod::where('status', 'Vigente')->firstOrFail(); $periodname=$academicperiods->period_name; $periodcode = $academicperiods->period_code; $finalperiodname='ASIGNATURAS A APERTURARSE EN EL PERÍODO '.$periodname.' ('.$periodcode.') '; //ASIGNATURAS A APERTURARSE EN EL PERÍODO MARZO 2020 - JULIO 2020 (SI-2020)
$params = [
'{period}'=>new ExcelParam(CellSetterStringValue::class, $finalperiodname),
'[subjectgrade]' => new ExcelParam(CellSetterArrayValue::class, $subjectgrade),
'[subjectdepartment]' => new ExcelParam(CellSetterArrayValue::class, $subjectdepartment),
'[subjectname]' => new ExcelParam(CellSetterArrayValue::class, $subjectname),
'[subjectcredits]' => new ExcelParam(CellSetterArrayValue::class, $subjectcredits),
'[total]' => new ExcelParam(CellSetterArrayValue::class, $total),
'[spaces]' => new ExcelParam(CellSetterArrayValue::class, $spaces),
'[observations]' => new ExcelParam(CellSetterArrayValue::class, $observations)
];
$saveAs = 'storage/files/3/Proyecciones de Matrícula/ReporteProyecciónMatrícula.xlsx';
PhpExcelTemplator::saveToFile($documentTemplate, $saveAs, $params);`
all the arrays have 60 items but my excel is exported with 500+-
I am also facing the exact same issue, someone please helpppppp ! ! ! @alhimik1986
Are there any solutions? @alhimik1986
@Artanisky Please, attach the template.xlsx, some data and code. I can't reproduce the bug.
ithik the name parameter is buggy if param name [date1] and [date11] it will insert both of them, try using very unique param name