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();
i want to access a specific cell in excel , and change its value . but i got the exception
OleDbException. No value given for one or more required parameters.What is the solution ?
If you use HDR=NO the column names are F1, F2 F3 etc……
but I think you should specify a WHERE clause to delimit the affected rows.
Remeber, using OleDb you should not think in terms of Rows/Columns but in terms of Records.
As an alternative, if you know exactly the row/column to update you could use