I have an excel file with 18 sheets, 75 columns and 50000 rows.
I am trying a code like this to replace values and it is saying syntax error.
from win32com.client import Dispatch #to work with excel files
.
.
.
.
fnd = "REPLACINGTHENAS"
rplc = ""
#18sheets
for i in range(1, (xlwb1.sheets.count +1)):
#Syntax error on the line below
xlwb1.Worksheets(i).Cells.Replace what:=fnd, Replacement:=rplc, LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
xlwb1.Save()
I am not sure why there is a syntax error. Kindly help me with this.