I have managed to get the process to search a ID number on a report from another report. I am trying to get it to add this to a file called Rejected.
At the moment I am using a For Each Row in DT and then filtering by the ID number to search if it is in the file. Once it locates it the robot is then copying the entire row but I only need the ID and Email address Column “C & D”. It then needs to append this onto another file to send an email.
If you always know the row number in the file you have to write to, you can use ‘Write Cell’ activity. You can extract the value from a data row using the column name or the index. E.g. row.Item(“ID”) or row.Item(2) .
You’ll most likely need multiple Write cell activities in this case.
The other option is to append a data table to the other file. You’ll need a DataTable to which you add your values as a new row, and then use ‘Write DataTable to Excel’ activity. This will be faster than writing each cell.
As others mentioned, ‘Filter Data Table’ activity or DataTable.Select method will give you results faster than using ‘For Each Row in DataTable’ activity.