<?php
include("./script/php/permission/connect_sql.php");
include("./script/php/excel/read_excel.php");

$data = $excelData["部門編號"];

for ($i = 1; $i < count($data); $i++) {    
    $sql = "INSERT INTO [dbo].[Department]
           ([DepartmentID]
      ,[DepartmentName]
      ,[Manager])
           VALUES           
            (?,?,?)";
    $stmt = sqlsrv_query($conn, $sql, array($data[$i][0],$data[$i][1],$data[$i][0]));
}