I’m pretty sure that the problem is the space in the name of your Faculty Name
column and that this has nothing to do with the use of AND
or OR
. Please try:
sql = "Update [Sheet1$] set A1 = 'a' " +
"where Designation = 'Prof(senior)' and [Faculty Name] = 'bob'";
1
solved IF A BLANK SPACE IS PRESENT IN THE COLUMN HEADING …..AND/OR operator not working in sql statement in c# .net for modifying an excel sheet [closed]