I am having 2 excel 1.MasterExcel 2.UpdatedExcel,then i want to compare the Empid(Column Name)
If the master’s excel having the same Empid then its should do nothing else the new Empid and Appropriate Row will update into the master Excel.
@keerthi_97
IT Sounds Like both Datatable have the Same column structure and If WE have an empid in Second Datatable that is Not present in the master Datatable then this row from Second Datatable should be added to mastertable. Is this understanding right?
@keerthi_97
Have a Look on your Screenshots on empid 3115
This Id is Not unique and occurs two Times
I dont know all your requirements, but maybe your scenario can even be solved with a merge table Activity, as there are no unique IDS and No record Updates for already existing but edited rows is Handled by your scenario specification
If i understood the Screenshots wrong then i would suggest following.
Find Common IDS, can be done with a linq Join Statement
Calculate non Common rows. Can be done wir Set Operation except function
@ppr
yeah,its having two 3115 only but my scenario is checking the Empid if it is in master or not if is there meaning leave as it is or its not there means i want to update in master table
@keerthi_97
Sure. But your First question is answered above
Use an assign Statement
Use Statement from above
Replace dtmaster, dtupdate Name with your datatablevariable names
Assign to a variable of list(of datarows)
Once you have done and IT works then WE will Guide you for the next steps
I did a setup with dummy data but it should match to your structure as close as possible
The scenario of nonmatching rows or only new rows in Update Excel is initially incorporated.
Myself Run the script by inseUpdateExcel.xlsx (11.0 KB) rt my Excels but master Excel didn’t updated the new one keerthi_97.xaml (8.5 KB) MasterExcel.xlsx (66.8 KB) i have attach thesaml file and master,updated Excels.
please check it…
@keerthi_97
dt1 representing the master is updated with the non common rows:
Sure the master Excel is not updated, as the updated dt1 is not written back to excel. For this task you can use a write range activity and it will write the entire new master data onto an excel
yeah, thank you… i got my requirement But i also need add column also if the new column is present in the updated data table then master also can update the column name as per.
can you help me.