Good morning, I would like to edit some cells from already existing excell file. I tried use EPPlus and normal OpenXml classes. However I failed. In both situation program w
//this help you to set cells in file excel : using System.Data.OleDb;
string connString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Directory.GetCurrentDirectory() + "/swtlist.xlsx;" +
@"Extended Properties='Excel 12.0;HDR=Yes;';Persist Security Info=False;";
using (OleDbConnection connection = new OleDbConnection(connString))
{
connection.Open();
try
{
OleDbCommand cmd = new OleDbCommand("UPDATE [Feuil1$] SET d='yes' ", connection);
cmd.ExecuteNonQuery();
connection.Close();
}
catch (Exception ex) { }
}