I already opened the template processor and made the changes that I need but I need help with the code that allows me to download the template already edited

0
    $sheet = \PhpOffice\PhpSpreadsheet\IOFactory::load(Storage_path('baja_tension.xlsx'));
  //Seleccionamos la hoja
    $sheet->setActiveSheetIndex(0);

    //Obtenemos sus datos
    $activeSheet = $sheet->getActiveSheet();

    $p=14;
    foreach($consulta as $tablero){

        $activeSheet->mergeCells("A$p:AJ$p");
    //funcion en donde se dara la posicion de la celda y el dato que se debera de mostrar en ella 
    $activeSheet->setCellValue("A$p", $tablero->name."  ".$tablero->tension);

    //funcion para darle color a la celda en la que se guadara el nombre del tablero 

            $activeSheet->getRowDimension($p)->setRowHeight(25);
            $p++;
    }

}
    
asked by Daniel rodas garcia 11.07.2018 в 17:30
source

0 answers