Hi, I did a project on “Facial attendance” which stores the names of students who attended the class in one excel file (names of total students with their mail IDs in another excel file is presaved)
Now I want to compare both excel files and send dynamic mails to their respective mail (if the student is present on that day it should send “your child_name attended the class today” and vice-versa for the absentees )
Welcome to forum it was really simple
First read the two excel file save it in DT1 and DT2
then
Step 2: (If you know LINQ use that other wise use for each) Your Fresher so use loop in upcoming days use LINQ
Now use for each
Use two for each loop DT1 inside that for-each loop use DT2
put condition copare both table
First condition if row(ColumnN) is null or empty
read that row(name or id or roleNo) then use lookup activity look that data table (use out of the loop) the send mail if you need send mail body dynamically use replace
Simple
If you need project wait for some time i will send the sample xml File
If you get the solution mark as the solution and close the topic
if have any drought in this above topic ping me I will help you
Note: Student ID should be unique and in both Excel file ID of the Student Should be same example Student Chethan ID is 1 In DT1 and in The DT2 Also Same ID for Chethan
I Use Message Box you replace and use mail activity
Its k Buddy if have any problem feel free and ask me
And i Use Linq it was fast to filter the datatable you can use If Condition like in if Stringisnullorempty(row.item("Attendence").tostring))
or before loop only use Filter data table Activity
Hello, Buddy, I like your Question
You can use the LookData table or you can use data row then you can use so many ways to use this
Hear your data of row Name is same for every excel *** the same item as Sheet 1***
So I choose this way Use LookUpActivity or You can Use LINQ Also but This is the simple way
Hear you have read three sheets but I use only two Sheet and write in sheet number 3
now I stored in 3 different variable Dt1 And Dt2 Dt3
Step2: Then loop a data table I took Dt1
Step3: Then inside that, we have to use the LookUp data table activity
Step4: Hear what we have to LookUp Dt2 value and name use that and target the value Number save it in a variable that should be double or generic
Step4: Save it a variable or directly you can apply to add the 3 variable
And store Using assign row1(1)=total
Then OutSide of For Each use write range