c# - Update specific cell of excel file using oledb -
i want update specific cell of excel file using oledb. i7 cell, reason i1 getting updated. can tell me what's wrong code?
oledbconnection oledbconn = new oledbconnection(connstring); oledbconn.open(); // want set value of i7 cell 22, reason value i1 getting updated :( oledbcommand cmd = new oledbcommand("update [" + sheetname + "$i7:i7] set f1=22", oledbconn); int result = cmd.executenonquery(); console.writeline(result); oledbconn.close();
this may purely issue cell address scheme you're using. try $i$7:$i$7
intsead. also, f1
thing in query?
Comments
Post a Comment