I know there is various topics regarding this, but I can’t find the solution that helps me.
I get an excel file that I need to sort out certain rows from and create a new excel file which will go to manual control. I have solved this by first creating a data table and several If statements to control if data in the row is going to manual control or not.
My issue is that I don’t get the robot to “paste” the entire row that is going to manual control into a new data table and further an excel workbook. All of the rows going to “Else” have to go into a new workbook to manual control.
If by “paste row into a new data table” you mean adding it to another data table, be advise that you cannot have a DataRow object contained by 2 DataTable objects. You have to create a new DataRow object to add it to the second data DataTable (or use Add Data Row activity and set the field values in the ArrayRow property).
Then the condition should be variabl.Contains(“word”) and in the else block (you said you want to keep the items not matching the condition) add an AddDataRow activity with ArrayRow property set to {row(0), row(1), row(2) …} (this will create a new DataRow object in the second data table).
Create DataTable object (with Build data table activity) outside the loop. In the loop just check for condition and add row in the new DataTable object.