UiPath | Remove Duplicate Rows from Excel / DataTable using two columns | Delete Duplicate Rows LINQ

  Рет қаралды 5,074

Act Automate

Act Automate

Күн бұрын

Пікірлер: 26
@TheOriginalbeat
@TheOriginalbeat Жыл бұрын
Mahmoud you are simply the best, thanks a lot for sharing.
@ActAutomate
@ActAutomate Жыл бұрын
Thanks a lot Mohammed 🙂
@jafarbasha4394
@jafarbasha4394 Жыл бұрын
Tnqq for ur video, it helps me now. ☺️
@ActAutomate
@ActAutomate Жыл бұрын
Cool ☺️ thanks for the feedback
@rasipogulabhaskar9858
@rasipogulabhaskar9858 Жыл бұрын
superb superb....
@ActAutomate
@ActAutomate Жыл бұрын
Thanks :-)
@maikjunior2811
@maikjunior2811 3 жыл бұрын
Hi, would you be so kind as to help me know how I update the last cell of an excel data table?
@ActAutomate
@ActAutomate 3 жыл бұрын
Hi Maik. It's very easy. You need only three activities: 1. Read Range --> To read the excel file and save it in variable ExcelDT for example. 2. Assign Activity --> Create an Int32 variable (RowsCount) and set it = ExcelDT.Rows.Count 3. Write Cell Activity --> Set the name of your Excel file, set the cell = "A"+(RowsCount+1).ToString and set the value which you need to enter in Excel. This flow if you want to change the column A last cell, but if you want to change column B, you have to set "B"+ (RowsCount+1).ToString and so you can change it. If you want to change the last row completely. You need Write Cell activity for each column. This is the best and easiest way to do that. Please let me know if you need help. Best regards Mahmoud
@maikjunior2811
@maikjunior2811 3 жыл бұрын
@@ActAutomate Hi thanks for taking the time to help me. Well I couldn't do what I would like. Here's what I want in a screenshot. I tried to do the way that showed me more he captures in a way that I don't know how to handle. See below >>> prntscr.com/1qbvo4a
@dedsec5177
@dedsec5177 3 жыл бұрын
how the same can be achieved in query syntax 🤔' !
@ActAutomate
@ActAutomate 3 жыл бұрын
You can do that as follows: ( From row In Excel_DT Group row By a = row("Location"), b = row("ZIP") Into grp = Group Select grp.First ).CopyToDataTable
@dedsec5177
@dedsec5177 3 жыл бұрын
@@ActAutomate Thanks Mahmoud 😊
@ActAutomate
@ActAutomate 3 жыл бұрын
@@dedsec5177 You're welcome 😃
@rhiran9019
@rhiran9019 2 жыл бұрын
@@ActAutomate thanks much. If the above is called as query syntax, then could you please let me know the term we use to refer for the syntax that you have used with .asenumerable in the video.
@jagadish_padhi
@jagadish_padhi 2 жыл бұрын
Hi, For example there 3 columns Column A Column B Column C ROY School Bike ROY College Bike ROY College Bike My question is i want to remove the duplicates of Column A and B and keep Column C as it is. Outcome Should come- Column A Column B Column C ROY School Bike ROY College Bike Please help
@ActAutomate
@ActAutomate 2 жыл бұрын
I already did it in another video. Please check it under the following link: kzbin.info/www/bejne/oX6winiFoNZmb9k You can select the columns you need. In your example you have to select the first two columns and set them in the code for Group. Please try it and if you don't know how to do it, just write me back.
@ActAutomate
@ActAutomate 2 жыл бұрын
you can also try this simple one: out_DT= YourDT.DefaultView.ToTable(True, {"Column A", "Column B"})
@johncena-lf9zb
@johncena-lf9zb 2 жыл бұрын
How can we delete selected (multiple)columns ?
@ActAutomate
@ActAutomate 2 жыл бұрын
Can you please give me more details, what you want to do? for multiple columns, for example: Column A to C --> (A:C) For only one column, for example: Column Z --> (Z:Z) But if you mean something else, please write more details.
@johncena-lf9zb
@johncena-lf9zb 2 жыл бұрын
By selecting multiple columns and removing the unwanted columns
@ActAutomate
@ActAutomate 2 жыл бұрын
@@johncena-lf9zb You mean, you want to delete each column, except the selected columns?
@johncena-lf9zb
@johncena-lf9zb 2 жыл бұрын
@@ActAutomate yes
@patanchanbaasha811
@patanchanbaasha811 Жыл бұрын
Thanks for the explanation Mahmoud. Can you please give me solution for below ColumnA Column B 1234 55 1234 55 2222 55 3333 77 My question is how can we remove duplicate row i.e 2nd row. And I would like to print 1st, 3rd and 4th rows only. Please help me
@ActAutomate
@ActAutomate Жыл бұрын
Thanks Patan, The answer is already in the video: ExcelDT.AsEnumerable().GroupBy(Function(a) Tuple.Create(a("ColumnA").ToString, a("ColumnB").ToString)).Select(Function(b) b.First).copyToDataTable() Or you can use the following query also: ( From row in MyDT Group row by k=row("ColumnA"), row("ColumnB") into grp = Group Where grp.Count = 1 Select grp ).CopyToDataTable Please check the following videos to learn more about that: LINQ Group LINQ Filter Data Table LINQ SelectMany Just let me know, if you still need help!
@patanchanbaasha811
@patanchanbaasha811 Жыл бұрын
@@ActAutomate sure, Appreciate your support. will get back to you if I need any help on this. Thank you so much.
@ActAutomate
@ActAutomate Жыл бұрын
@@patanchanbaasha811 No problem! 🙂
Get duplicates and non duplicate rows using Uipath
20:00
Let's Automate!!
Рет қаралды 5 М.
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 25 МЛН
Não sabe esconder Comida
00:20
DUDU e CAROL
Рет қаралды 36 МЛН
Remove Duplicates from DataTable : UiPath LINQ Tutorials
16:13
Automate with Rakesh
Рет қаралды 2,4 М.
Excel Settings That ACTUALLY Make a Difference
12:27
Excel Campus - Jon
Рет қаралды 36 М.
The Excel Trick I Use EVERY DAY (and you should too!)
11:21
MyOnlineTrainingHub
Рет қаралды 171 М.
Q&A LINQ Querries | UiPath Automation Developer Professional Exam Preparation
15:34
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 25 МЛН