Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

too many rows #24

Open
disney1993 opened this issue Aug 29, 2020 · 4 comments
Open

too many rows #24

disney1993 opened this issue Aug 29, 2020 · 4 comments

Comments

@disney1993
Copy link

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+-

@shubhamt619
Copy link

I am also facing the exact same issue, someone please helpppppp ! ! ! @alhimik1986

@Artanisky
Copy link

Are there any solutions? @alhimik1986

@alhimik1986
Copy link
Owner

@Artanisky Please, attach the template.xlsx, some data and code. I can't reproduce the bug.

@wahyuam
Copy link

wahyuam commented Jun 27, 2022

ithik the name parameter is buggy
if param name [date1] and [date11] it will insert both of them, try using very unique param name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants