Hey Team i have two datatable namely dt_Comparison
and dt_ned_compare
i want to get rows that are in dt_comparison but not in dt_ned_compare this is my expression
which produces
Can you please advice what is it m doing wrong
The syntax looks fine at a first glimpse.
It can be the case that small things are the reason, as the data comes from excel: different interpretation of the data to data column datatypes, the date values and time portions.
Here we would check a common row from both dts within the immediate panel
like:
dt1.Rows(1).ItemArray
dt2.Rows(0).ItemArray
dt1.Rows(1).ItemArray.SequenceEqual(dt2.Rows(0).ItemArray)
As a last ressort we can also check for an alternate LINQ / Approach
- Use “Read Range Workbook” activity and read both the Excel files and store it in data Table say dt1 and dt2.
- Use Assign activity and give below condition:
dt_Result= dt1.AsEnumerable.Except(dt2.AsEnumerable, System.Data.DataRowComparer.Default).CopyToDataTable
(dt_Result datatype is System.Data.DataTable)
3. Use “Write Range Workbook” activity to write the data table to excel.
Check out the below xaml file.
Sequence21.xaml (7.9 KB)
Output excel:
Hope it helps!!
Regards,
Thank you very Peter
It works Parvathy thank you very much
If you find solution for your query please mark it as solution to close the thread.
Happy Automation
Regards,
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.