set xlapp = createobject("Excel.Application")
set wb = xlapp.workbooks.open("D:\test.xls")
set sh = xlapp.worksheets(1)
rc = sh.usedrange.rows.count
for j = 2 to rc
' write must be bases on condition
sh.cells(j,2) = "pass"
Next
xlapp.Visible = True
wb.close
xlapp.quit
set xlapp = nothing
No comments:
Post a Comment