its better to make all the variables values into an array
and use for each row in datatable activity and create output as index for that activity
inside use
assign activity
currentRow(“ColumnName”)=arrar(index)
outside of for each row in datatable use write range activity