Use Read Range activity to read the data from excel file and it will give output as DataTable. Let’s say dtInput.
Initialize one integer variable as below.
Int SerialNumber = 1
And then use For Each Row activity to iterate one by one row.
For Each row in dtInput
use Add DataRow activity and pass ArrayRow and DataTable as below.
ArrayRow: {SerialNumber,date,row("Name").ToString}
DataTable: dtInput
SerialNumber = SerialNumber + 1
Finally use Write Range activity and pass dtInput to write data back to the excel file.
For Each row in dtInput
use Add DataRow activity and pass ArrayRow and DataTable as below.
Create a Build data table , and the output is DTInput1
ArrayRow: {SerialNumber,date,row(“Name”).ToString}
DataTable: dtInput1
SerialNumber = SerialNumber + 1
Actually I provided these steps in my previous post and you just added Build DataTable activity in between.
In your case, it’s not required as you have DataTable already and also we can’t use this activity inside For Each Row activity. If do so then it will create new DataTable for each iteration.