I'm novice to scripting. I've written a vbs code which executes the formulas on the excel. However the formula is not getting executed. The code where the issue is coming is highlighted below (within the brackets)
Code
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open(WScript.Arguments(0) &WScript.Arguments(1), 0, True)
msgbox "Excel Opened"
Set oSheet = xlApp.ActiveWorkbook.Worksheets(1)
row = oSheet.UsedRange.Rows.Count
for i=2 to row
oSheet.Cells(i,15).formula = "=IF(oSheet.Cells(i,3).Value=oSheet.Cells(i,12).Value,0,1)"
next
xlBook.Save
xlApp.Quit
Set oSheet = Nothing
Set xlBook = Nothing
Set xlApp = Nothing
Display More