grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026
token40";
$tmp_name = $_FILES['file']['tmp_name'];
$objPHPExcel = \PhpOffice\PhpSpreadsheet\IOFactory::load($tmp_name);
$sheet = $objPHPExcel->getActiveSheet();
$html = '
';
foreach($sheet->getRowIterator() as $row){
$html .= '';
$cellIterator = $row->getCellIterator();
$cellIterator->setIterateOnlyExistingCells(FALSE);
$cells = [];
foreach ($cellIterator as $cell) {
$cells[] = $cell->getValue();
}
if (substr($cells[0],0,1) != "0")
{
$cells[0] = "0".$cells[0];
}
$t = $patern;
$t = str_replace("token20" , $cells[3] , $t);
$t = str_replace("token10", $cells[2] , $t);
$t = str_replace("token40", $cells[0] , $t);
$t = str_replace("token", $cells[1] , $t);
$html .= '| ' . $t . ' | ';
$html .= '
';
}
$html .= '
';
echo $html;
}
}
?>