Give me some clarification on this, you want to remove the duplicates in the FA number column. Am I right?
If yes, then follow the below process,
→ Use Read range workbook activity to read the excel and store in a datatable called Input_dt.
→ Take an assign activity to write the LinQ Expression
- Assign -> Output_dt = (From row In dt.AsEnumerable()
Where Not row.IsNull("FA Number") AndAlso Not String.IsNullOrEmpty(row("FA Number").ToString())
Select row
).Distinct().CopyToDataTable()
→ Use Write range workbook activity to write the Output_dt to the excel.
Or
Simply you can use the Remove Duplicates activity, it was an Modern design Excel activity
You have to use this activity inside Use excel file activity.
We assume that the Project Compatibility is set to: Windows
A → LINQ → Distinct Method will not deduplicate, if used against DataTable / DataTable Rows, but not the necessary Comparer will be passed as an additional function Argument
Unfortunately our Question on
was not answered
Assumption: only FA numbers will be used for the DeDuplication
A sample flow like (Excel was read in into a datatable):
May i confirm the following is right if i want to delete dulplicate FA Number row data
dtDeduplicated =
dtData.AsEnumerable().DistinctBy(Function (x) x(“FA Number”).toString.Trim).CopyToDataTable
Here you are not using Remove Duplicates activity with in the Use excel file.
Kindly, Drag and drop Use excel file activity inside of it use Remove Duplicates activity.
→ Insert Use excel file activity and give the path of the file.
→ Inside Use excel file insert the Remove Duplicates activity and give the range as below,
Excel.Sheet("FA for 4N")
Check the below workflow for better understanding,