Are you using Studio or StudioX?
You can achieve this in a couple of different ways.
First off → To improve your current approach, you just need to properly increment your row reference, i.e. to go from I4 to I5, I6 and so on, you need to use a variable e.g. intCounter which you can increment per loop.
and then use it in Write Cell activity such as
"I" + intCounter. This way, it will write in the corresponding row.
If you’re using Studio, you might consider overwriting the spreadsheet completely with a new updated datatable object. This is an overhead programmatically, but simpler to implement.
- Use Read Range to get worksheet as datatable
- Update your datatable object by using simple column update, e.g.
myTable(rowCounter)("columnName") = "NewValue"
myTable is your entire sheet as table.
rowCounter is your current row which you will increment per loop
columnName is the header of your column I (which you want to update)
- Use Write Range activity to update the datatable back into the worksheet.
I hope this helps.