Hi Guys,
I need to count in each filter value in excel using uipath
For example,
i attached excel and result
test.xlsx (8.5 KB)
Result:
aa count is 2
gg count is 3
Please anyone help this
Regards,
Raja G
Hi Guys,
I need to count in each filter value in excel using uipath
For example,
i attached excel and result
test.xlsx (8.5 KB)
Result:
aa count is 2
gg count is 3
Please anyone help this
Regards,
Raja G
Follow below steps.
Use Read Range activity to read the data from excel file and will give you output as DataTable and say āinputDTā.
And then try below expression.
uniqueDT = inputDT.DefaultView.ToTable(True,"ColumnName")
ForEach row in uniqueDT
Int filterCount = inputDT.Select("[Column Name] = '"+row("ColumnName")+"'").CopyToDataTable.Count
@Raja.G If you havenāt found the Solution yet , Can you tell us Where do you want the Count to Be Stored?
@Raja.G Can you show us a Sample Output for the Test File given , with that we can confirm what needs to be done
Hi @supermanPunch,
Repeat count just a output column ,that column i need to show next sheet in same excel, can u help this
Regards,
Raja G
@Raja.G I can Understand Ian Count is 2, Sandeep Count is 2 but for Ross Repeat_Count Should be Ross count is 3 Right, or is that a Mistake ? Also I didnāt understand How did you put 34 count is 3 for the Name John, I did not get the Pattern you used
@Raja.G Check this workflow, It is Similiar to what you want, but it is not Completely Satisfying the output Format you provided
RepeatCount.zip (12.7 KB)
Hey @supermanPunch,
Working fine but one column only , i need each column, if u free please can u help .
In this below code one column only worked , i tried to add my second column but i couldnāt able to that.
(From p In DT.AsEnumerable() Group By x= New With { Key.a =p.Item(ācolumn 1ā)} y = New With {key.a = p.item(ācolumn 2ā)} Into Grp = Group Select resultDT.Clone.LoadDataRow (New Object() {grp(0)(0),grp(0)(0).toString+" Count is "+grp.Count.toString},False)).CopyToDataTable
Regards,
Raja G
I expected output below,
@Raja.G This is the Closest Format I could come up with There might be other ways, but for now i could only Come up with this idea, If those two Columns needs to be present on Separate Sheets then there is a way but together I couldnāt find the Fastest method.
Check this :
RepeatCount.zip (12.5 KB)
Hi @supermanPunch ,
Good afternoon
Thanks for your code i just add small modification and i got a output