can you tell me in detail.
Hello @vineelag, not sure to be the right person
Oh, I need your input and expect output
I will edit code
sure will share with you.
in my case i have excel1(Today)
Exce1(Today) you can see below
as you can see in excel1(today) from this excel we will take each account and check that account in Excel2(Masterfile)
Excel2(Masterfile) You can see below img
need logic for
Each account i need to check in Excel2(Masterfile) if its contains Excel1 account(45398719) in excel2(Master file) then i need to Increase the count value+1(for this account 1+1=2 the count value is 2)
i was attached the file with this, kindly let me know the output for this.
Its working awesomely, but its taking more time for each transection because its looping each account in excel2(Masterfile)
per day i am getting 15000 transection is there any another alternative simple code for to save time.
I think LinQ can be faster
I haven’t tried it yet
But I 15000 row are not problems
How long does it take on your machine?
I didn’t see it for too long
For 100 transections its taking 2 hrs peroxyl.
oh, in your file send to you have 10 rows, it take 1s to complete
I think 15000 is not problem
but we can think use LINQ
how can i use LINQ code
’ Read the first Excel file into a DataTable
Dim dtFirstFile As DataTable = New DataTable()
dtFirstFile = ExcelApplicationScope1.ReadRange(“Sheet1”)
’ Read the second Excel file into a DataTable
Dim dtSecondFile As DataTable = New DataTable()
dtSecondFile = ExcelApplicationScope2.ReadRange(“Sheet1”)
’ Extract the values from the DataTables into lists
Dim valuesInFirstFile = dtFirstFile.AsEnumerable().Select(Function(row) row.Field(Of String)(“Name”)).ToList()
Dim valuesInSecondFile = dtSecondFile.AsEnumerable().Select(Function(row) row.Field(Of String)(“Name”)).ToList()
’ Find common values using LINQ
Dim commonValues = valuesInFirstFile.Intersect(valuesInSecondFile)
’ Loop through the common values and perform actions
For Each commonValue In commonValues
LogMessage("Common value: " & commonValue)
But i am not sure about it.
please kindly guide me on this.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.