title: How to update data from datagridview into excel using c#
body: <p>I read excel file into datagridview and hanlde it(add row,update values,etc..) and when it's finish i want to update all data(include old and new data) into old excel file.
  Code below only update column"task"</p>
  
  <pre><code> OleDbConnection MyConnection = new OleDbConnection(connString);
          MyConnection.Open();
          myCommand.Connection = MyConnection;
          sql = "Update into [Associates_Loading_Details$] values ('" + dataGridView1["Task", dataGridView1.CurrentRow.Index].Value.ToString() + "')";
          myCommand.CommandText = sql;
              myCommand.ExecuteNonQuery();
  </code></pre>