title: Transferring data from an Excel file into a MySQL table
body: <p>I have an Excel 2003 spreadsheet that I need to import into MySQL.  I have a table called <code>dev_products</code> with two fields; product_id and product_description.  The Excel file has exactly the same column structure - but I don't know how to transfer the data (through code - as I will have to do this again).</p>
  
  <p>I am able to connect to the file....but that's about as far as I have got....and I really need some help.</p>
  
  <p>Thanks - as always.</p>
  
  <pre><code>    const string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + strExcelFilenameandLocation + "; Extended Properties=Excel 8.0;";
      OleDbConnection xlConn = new OleDbConnection(connectionString);
      xlConn.Open();
  
      string strQuery = "??????????";
  
      var con = new MySqlConnection(ClsVariables.StrDb);
      con.Open();
      MySqlCommand command = new MySqlCommand(strQuery, con);
      command.ExecuteNonQuery();
      con.Close();
      xlConn.Close();
  </code></pre>