I have this code to update the value of an Excel cell in A1:
objConn.Open(); OleDbCommand objCmdUpdate = new OleDbCommand("UPDATE[Sheet1$A1:A1] SET F1 = 2000", objConn); objCmdUpdate.ExecuteNonQuery();
It is working and update cell A1 to 2000. However, my goal is to get the calculated value of cell B1 which has formula =20*A1
Now I use this line to get cell B1
new OleDbCommand("SELECT * from [Sheet1$B1:B1]", objConn2);
It is getting a value but it is getting cell value of B1 BEFORE using new A1 to calculate B1 cell value.
What is the code above to ensure the worksheet formula to calculate ?
Thanks