Здравствуйте, задача такая.
Найти в Excel файле дубликаты, удалить их и посчитать итоговую сумму оставшихся строк. И отправить на почту.
Я все написал, сумму считает, но проблема в том что дубликаты почему то не удаляет, не пойму в чем причина…
You can try with remove duplicate rows activity and pass your datatable here
Regards
Sudharsan
You can also try this
If you want to remove the duplicate rows based on one column check with this expression
(From p in DT.Select() where( From q in DT.Select() where q(“NLC”).Equals(p(“NLC”)) Select q).ToArray.Count=1 Select p).ToArray.CopyToDataTable()
If you need to get only the rows with one occurence means check with this expression
DT.AsEnumerable().GroupBy(Function(a) a.Field(Of String)(1)).Select(Function(b) b.First).CopyToDataTable()
You can also try with this
Datatable.DefaultView.Totable(true, {"list", "of", "column","names"})
Regards
Sudharsan
Я использовал Remove Duplicate Rows, но он почему то не удаляет дубликаты при компиляции программы.
Форум не разрешает прикрепить скриншоты программы или ее тело…
How about this expression
(From d In DtBuild.AsEnumerable
Group d By k=d("Column Name").toString.Trim Into grp = Group
Let ra = New Object(){k,grp.First()(1)}
Select r = DtOutput.Rows.Add(ra)).CopyToDataTable
Check out the XAML file
Duplicate&Sum.xaml (9.1 KB)
Regards
Gokul
Спасибо за помощь! Заработало!
Этот пакет помог, но неужели нельзя сделать это с помощью стандартных блоков?
Are you asking about activities?
да о стандартных активностях
No we only have these activities @antonstep9213
Remove duplicates and you said it is not working in your case
other than that we have a modern design activity called Remove duplicates it will remove directly in the excel
Regards
Sudharsan
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.