How to Subtract two datatables using LINQ in Uipath (Except Operator)

Problem statement : We have 2 employee datatables and we need to extract just the records of employees from datatable1 which are not present in the datatable2 which means we need to subtract both the datatables.

Here are the datatables

Dt2

Dt1

Drag the assign activity to the workflow, write the following query

Here is final execution

GitHub : UiPathSamples/06 - SubtractDatatableUsingLinq at main · manojbatra071/UiPathSamples · GitHub

YouTube Video : Subtract Datatables using LINQ in UiPath - YouTube

Medium Article : How to Subtract two datatables using LINQ in Uipath - Manoj Batra - Medium

Happy Automation

1 Like