load($_FILES['berkas_excel']['tmp_name']); $sheetData = $spreadsheet->getActiveSheet()->toArray(); for($i = 1;$i < count($sheetData);$i++) { $pegawai_status_kp = $sheetData[$i]['1']; $pegawai_nik = $sheetData[$i]['2']; $pegawai_nitk = $sheetData[$i]['3']; $pegawai_nama = $sheetData[$i]['4']; $pegawai_gelar = $sheetData[$i]['5']; $pegawai_gelar2 = $sheetData[$i]['6']; $pegawai_tpl = $sheetData[$i]['7']; $pegawai_tgl = $sheetData[$i]['8']; $pegawai_jk = $sheetData[$i]['9']; $pegawai_agama = $sheetData[$i]['10']; $pegawai_darah = $sheetData[$i]['11']; $pegawai_ktp = $sheetData[$i]['12']; $pegawai_npwp = $sheetData[$i]['13']; $pegawai_bpjs = $sheetData[$i]['14']; $pegawai_kk = $sheetData[$i]['15']; $pegawai_rekening = $sheetData[$i]['16']; $pegawai_kontak = $sheetData[$i]['17']; $pegawai_email = $sheetData[$i]['18']; $pegawai_email2 = $sheetData[$i]['19']; $pegawai_alamat2 = $sheetData[$i]['20']; $pegawai_alamat = $sheetData[$i]['21']; $pegawai_status = $sheetData[$i]['22']; $pegawai_pasangan = $sheetData[$i]['23']; $pegawai_ibu = $sheetData[$i]['24']; $pegawai_anak = $sheetData[$i]['25']; $pegawai_fakultas = $sheetData[$i]['26']; $pegawai_bagian = $sheetData[$i]['27']; $pegawai_pendidikan = $sheetData[$i]['28']; $pegawai_program_studi = $sheetData[$i]['29']; $pegawai_almamater = $sheetData[$i]['30']; $pegawai_tahun_lulus = $sheetData[$i]['31']; $pegawai_kompetensi = $sheetData[$i]['32']; $pegawai_jabatan = $sheetData[$i]['33']; $pegawai_tmtjabatan = $sheetData[$i]['34']; $pegawai_tmtjabatan_selesai = $sheetData[$i]['35']; $pegawai_no_golongan = $sheetData[$i]['36']; $pegawai_golongan = $sheetData[$i]['37']; $pegawai_tmt_golongan = $sheetData[$i]['38']; $pegawai_nojabatan = $sheetData[$i]['39']; $pegawai_tmtd = $sheetData[$i]['40']; $pegawai_notmtd = $sheetData[$i]['41']; $pegawai_vaksin = $sheetData[$i]['42']; $pegawai_nomor = $sheetData[$i]['43']; $pegawai_foto = $sheetData[$i]['44']; $pegawai_user = $sheetData[$i]['45']; mysqli_query($koneksi,"insert into pegawai (pegawai_id,pegawai_status_kp,pegawai_nik,pegawai_nitk,pegawai_nama,pegawai_tpl, pegawai_tgl,pegawai_jk, pegawai_agama, pegawai_status, pegawai_bagian, pegawai_fakultas, pegawai_jabatan, pegawai_tmtjabatan, pegawai_tmtjabatan_selesai, pegawai_nojabatan, pegawai_golongan ,pegawai_tmt_golongan , pegawai_no_golongan ,pegawai_pendidikan, pegawai_program_studi, pegawai_tahun_lulus, pegawai_almamater, pegawai_notmtd, pegawai_tmtd, pegawai_kontak, pegawai_alamat, pegawai_email, pegawai_gelar,pegawai_gelar2,pegawai_ktp,pegawai_npwp,pegawai_bpjs,pegawai_kk,pegawai_rekening,pegawai_darah,pegawai_alamat2, pegawai_email2,pegawai_pasangan,pegawai_ibu,pegawai_anak,pegawai_kompetensi, pegawai_vaksin, pegawai_nomor, pegawai_foto, pegawai_user) values (NULL,'$pegawai_status_kp','$pegawai_nik', '$pegawai_nitk', '$pegawai_nama','$pegawai_tpl', '$pegawai_tgl','$pegawai_jk','$pegawai_agama', '$pegawai_status', '$pegawai_bagian', '$pegawai_fakultas', '$pegawai_jabatan','$pegawai_tmtjabatan','$pegawai_tmtjabatan_selesai','$pegawai_nojabatan', '$pegawai_golongan' ,'$pegawai_tmt_golongan' , '$pegawai_no_golongan' ,'$pegawai_pendidikan', '$pegawai_program_studi','$pegawai_tahun_lulus','$pegawai_almamater', '$pegawai_notmtd', '$pegawai_tmtd', '$pegawai_kontak', '$pegawai_alamat', '$pegawai_email', '$pegawai_gelar','$pegawai_gelar2','$pegawai_ktp','$pegawai_npwp','$pegawai_bpjs','$pegawai_kk','$pegawai_rekening','$pegawai_darah','$pegawai_alamat2', '$pegawai_email2','$pegawai_pasangan','$pegawai_ibu','$pegawai_anak','$pegawai_kompetensi','$pegawai_vaksin', '$pegawai_nomor', '$pegawai_foto', '$pegawai_user')") or die (mysqli_error($koneksi)); } header("Location: pegawai.php?alert=berhasil"); } ?>