title: SQLBulkCopy inserts a new row with NULL values for all columns
body: <p>I have this code which works fine and loads the excel data into an SQL table. The only problem is that it also inserts a new row with NULL values for all columns.</p>
  
  <pre><code>using (OleDbConnection excel_con = new OleDbConnection(conString))
  {
  excel_con.Open();
  string sheet1 = excel_con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null).Rows[0]["TABLE_NAME"].ToString();
  DataTable dtExcelData = new DataTable();
   using (OleDbDataAdapter oda = new OleDbDataAdapter("SELECT * FROM [" + Path.GetFileName(excelPath) + "]", excel_con))
              {
                  oda.Fill(dtExcelData);
              }
              excel_con.Close();
  
  using (SqlConnection con = new SqlConnection(consString))
              {
                  using (SqlBulkCopy sqlBulkCopy = new SqlBulkCopy(con))
                  {
                      //Set the database table name
                      sqlBulkCopy.DestinationTableName = "dbo.mySQLTable";
  
  
                      sqlBulkCopy.BulkCopyTimeout = 200;
  
                      sqlBulkCopy.ColumnMappings.Add("Employee", "Employee_Name");
                      sqlBulkCopy.ColumnMappings.Add("Sal/Hourly", "Sal/Hourly");
  
                      sqlBulkCopy.ColumnMappings.Add("Total", "Total"); 
  
                      con.Open();
                      sqlBulkCopy.WriteToServer(dtExcelData);
                      con.Close();
                  }
              }
  }
  </code></pre>
  
  <p>This 2988 row is not present in excel, but the code creates it. Any help is appreciated.</p>
  
  <p><a href="https://i.stack.imgur.com/S4wDq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S4wDq.png" alt="enter image description here"></a></p>