I have two excel file
ITC.xlsx (8.5 KB)
and
Master.xlsx (8.4 KB)
I need to check whether coloumn data(“Business Partner”) of ITC.xlsx is available in the coloumn data(“G/L”) of Master.xlsx if it is available update in the coloumn(“Status”) of ITC.xlsx as Available else not available Any linq query for this, please help
1 Like
Hi @alan.prakash ,
If file is not large, we can use for each row with assign activity
the file is large for each row i tried but it takes so much time i applied formulas also but need to open two excel file inorder to show the values or else it shows #VALUES
I will try LINQ with this file
Try this:
(From rowITC In dtITC.AsEnumerable()
Join rowMaster In dtMaster.AsEnumerable()
On rowITC.Field(Of String)("Business Partner") Equals rowMaster.Field(Of String)("G/L")
Select rowITC.SetField("Status", "Available")).CopyToDataTable()
Hi,
Can you try the following sample?
dtITC.AsEnumerable.ToList.ForEach(Sub(r)
If arrMaster.Contains(r("Business Partner").ToString) Then
r("Status")="Available"
Else
r("Status")="Not Available"
End If
End Sub
)
Sample20230912-4L.zip (15.0 KB)
Regards,
I wll try to do this
Thank u solution working perfectly
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.