import file from excel and add pagination

right now i am making website so people can upload excel and auto input into table but the problem is when someone upload excel with a lot of rows its getting lag and take so much time, i wanna limit the data into 10 with page

here is my code maybe you guys can help me

$numrow = 1;
                $kosong = 0;
                $no ="";
                $cosCenter = "03060200";
                $no_document = $this->mo_detailBiayaTransport->getLastCounterNumber();
                $lastUpdateName = $this->mo_detailBiayaTransport->getNamaCounterLast();
                date_default_timezone_set('Asia/Jakarta');
                $tanggal = date('Y-m-d H:i:s');
                function rupiahFormat($angka){
                    $format = "Rp".number_format($angka,0, ".",".");
                    return $format;
                }
                $page = (isset($_GET['page']))? (int) $_GET['page'] : 1;
                $limit = 5;
                $limitStart = ($page - 1) * $limit;
                $SqlQuery = $sheet;
                $no = $limitStart + 1;
                foreach($sheet as $row){
                    $no_akun = "100102";
                    $costCenter = "99999999";
                    $nik_karyawan = $row['A'];
                    $nama = $row['B']; 
                    $jabatan = $row['C'];
                    $total = $row['D'];
                    $pekerjaan = $row['E'];
                    $jam_awal = $row['F'];
                    $jam_akhir = $row['G'];
                    $status = $row['H'];
                    $perhitungan_lembur = rupiahFormat((float)$row['I']);
                    $description = ("PEMBAYARAN LEMBUR A/N ".$nama." TANGGAL ".date('j F,Y',strtotime(str_replace('/','-',$jam_awal)))." PEKERJAAN ".$pekerjaan);
                    if( 
                      // $no_document == ""
                     $no_akun== ""    
                    && $costCenter == ""
                    && $nik_karyawan == "" 
                    && $nama == "" 
                    && $jabatan == "" 
                    && $total == ""
                    && $pekerjaan == "" 
                    && $jam_awal == ""
                    && $jam_akhir == "" 
                    && $status == "" 
                    && $perhitungan_lembur == ""
                    && $description == "" )
                        continue;
                
                if($numrow > 1){
                    $no_document_td =  ('');
                    $no_akun_td = ( ! empty($no_akun))? "" : " style='background: #E07171;'";
                    $costCenter_td = ( ! empty($costCenter))? "" : " style='background: #E07171;'";
                    $nik_karyawan_td = ( ! empty($nik_karyawan))? "" : " style='background: #E07171;'"; 
                    $nama_td = ( ! empty($nama))? "" : " style='background: #E07171;'"; 
                    $jabatan_td = ( ! empty($jabatan))? "" : " style='background: #E07171;'"; 
                    $total_td = ( ! empty($total))? "" : " style='background: #E07171;'";
                    $pekerjaan_td = ( ! empty($pekerjaan))? "" : " style='background: #E07171;'"; 
                    $jam_awal_td = ( ! empty($jam_awal))? "" : " style='background: #E07171;'";
                    $jam_akhir_td = ( ! empty($jam_akhir))? "" : " style='background: #E07171;'";
                    $status_td = ( ! empty($status === 'HD'))? "" : " style='background: #E07171;'";
                    $perhitungan_lembur_td = ( ! empty($perhitungan_lembur))? "" : " style='background: #E07171;'";
                    $description_td = ( ! empty($description))? "" : " style='background: #E07171;'";
                    
                    if(
                     $no_akun== ""    
                    or $costCenter == ""
                    or $nik_karyawan == "" 
                    or $nama == "" 
                    or $jabatan == ""
                    or $total == ""
                    or $pekerjaan == ""
                    or $jam_awal == ""
                    or $jam_akhir == ""
                    or $status == ""
                    or $perhitungan_lembur == ""
                    or $description == ""){
                    $kosong++; // Tambah 1 variabel $kosong
                    }
                   

                    echo "<tr>";
                    echo "<td".$no_document_td.">".$no_document++."</td>";
                    echo "<td".$no_akun_td.">".$no_akun."</td>";
                    echo "<td".$costCenter_td.">".$costCenter."</td>";
                    echo "<td".$nik_karyawan_td.">".$nik_karyawan."</td>";
                    echo "<td".$nama_td.">".$nama."</td>";
                    echo "<td".$jabatan_td.">".$jabatan."</td>";
                    echo "<td".$total_td.">".$total."</td>";
                    echo "<td".$pekerjaan_td.">".$pekerjaan."</td>";
                    echo "<td".$jam_awal_td.">".$jam_awal."</td>";
                    echo "<td".$jam_akhir_td.">".$jam_akhir."</td>";
                    echo "<td".$status_td.">".$status."</td>";
                    echo "<td".$perhitungan_lembur_td.">".$perhitungan_lembur."</td>";
                    echo "<td".$description_td.">".$description."</td>";
                    echo "</tr>";
                }

                $numrow++; // Tambah 1 setiap kali looping
                }   

                echo "</table>";

the excel upload is already success but i don't know how to add the page, thanks for helping its mean a lot