rsr.chandu
(Rsr Chandu)
1
I have two excel files A & B, Excel A is attached below
In Excel A Column Name
Your Value
Excel B is attached Below
In Excel B Column Name
Invoice Number
Condition need to check here is when Excel A Your Value column matches with Excel B Invoice Number I need to delete matching rows in Excel B
Please provide your inputs
Thanks in advance
Appreciating your time and patience
Check this linq:
dt_ExcelB = dt_ExcelB.AsEnumerable().Where(Function(row) Not dt_ExcelA.AsEnumerable().
Select(Function(a) a(“Your Value”).ToString.Trim).Contains(row(“Invoice Number”).ToString.Trim)).CopyToDataTable()
Hi @rsr.chandu
First use read range workbook to read the 2 excels in the datatable dt_ExcelA and dt_ExcelB respectively
Then use assign activity
dt_ExcelB = dt_ExcelB.AsEnumerable().
Where(Function(rowB) Not dt_ExcelA.AsEnumerable().
Any(Function(rowA) rowA("Your Value").ToString.Trim = rowB("Invoice Number").ToString.Trim)).
CopyToDataTable()
Try this
Hope this helps!
rsr.chandu
(Rsr Chandu)
6
I tried the above solution but it is not deleting the matching rows in excel b file