Remove rows

This is my two text file one is sample.txt & other is sample1.txt and i want to read sample.txt text file then check Option A if Option A have Account code ex. 113401 then goto sample 1.txt and remove row which has account no 113401
then again check second Option A again it has account no then remove from sample1.txt

Hello @Yogita_Gaikwad ,

Try the below :

Read both the CSV files and store the data in DT1 (Sample1) & DT2 (Sample) Data Tables. Create a OutputDT (To Store the result)

  • Assign OutputDT = DT1

  • Loop over DT2 using for loop

  • Use Assign Activity (OutputDT = OutputDT.asEnumerable.where(Function(x) Not x(“GL Account”).ToString.Equals(row(“Column-2”).ToString.Trim)).CopyToDataTable
    image

  • Outside the for loop use write range / Write CSV to write back the required result from OutputDT.

Hope it helps!

Regards,
Rohith

sample.txt (559 Bytes)
This is my sample.txt
sample1.txt (828 Bytes)
This is my sample1.txt
can do for this

@Yogita_Gaikwad , Yes you can do for this. Please proceed as suggested above & if u face any challenges post it here.

firstly in sample file check option A if it has Account no then delete from sample1.txt how do it