【发布时间】:2012-09-05 15:19:41
【问题描述】:
string connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Application.StartupPath + "\\a.xlsx" + ";Extended Properties='Excel 12.0 Xml;HDR=No'";
OleDbConnection conn = new OleDbConnection(connString);
OleDbCommand cmd = new OleDbCommand("Update [tablenameeee$] SET A1='15'", conn);
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
我想访问 excel 中的特定单元格,并更改其值。但我有例外
OleDbException。一个或多个必需参数没有给出值。解决方案是什么?
【问题讨论】: