第1个回答 2016-06-05
string strConn = "Provider=Microsoft.Ace.OleDb.12.0;Persist Security
Info=False;" + "data source=" + @excelPath + ";Extended
Properties='Excel 12.0; HDR=yes; IMEX=2'";
OleDbConnection conn = new OleDbConnection();
conn.ConnectionString = strConn;
try
{
OleDbCommand cmd = null;
try
{
cmd = new OleDbCommand("在这里写Update的SQL语句", conn);//(A,B,C,D,E,F,G)
cmd.ExecuteNonQuery();
}
catch (System.Exception ex)
{
textBox1.Text += ( ex.Message);
textBox1.Text += ("\r\n");
}本回答被网友采纳