Hi Team,
I have an excel with 10000 records and i want to form a other datatable with only 1000 records where 1000 picked randomly from whole datatable. Bot should not pick top 1000 or last 1000. Please help me on this.
Thanks in advance…!!
Hi Team,
I have an excel with 10000 records and i want to form a other datatable with only 1000 records where 1000 picked randomly from whole datatable. Bot should not pick top 1000 or last 1000. Please help me on this.
Thanks in advance…!!
Try this;
Order the rows in a data table randomly.
Take the 1000 rows from the randomly ordered data table.
Dim rand = New Random()
Dim employees = employee.AsEnumerable().OrderBy(Function(rn) rand.Next).Take(10)
Regards,
Karthik Byggari
Hi Kathik,
Using above syntax i’m getting top rows only it is not picking randomly.
Please see the image.
How many rows are in dt1?
total 5 rows
when printing using for each row always first 3 rows only printing.
Can you please try with more than 10 rows and let me know if the result is same.
Welcome to the uipath community.
Please check below thread and give it a try once.
Okay. Let me check from my side and let you know the output.
Regards,
Karthik Byggari
Hi @Needhelp
Wait I will check and let you know the findings.
Hi @Needhelp
I posted a custom activity in the UiPath Connect.
Please download the package from here -
It will be soon available in the Manage Packages.
Regards,
Karthik Byggari
Hi,
It says that the resource does not exist
Oops. Can you send me the error screenshot to analyse.
I guess the component is in review. I will let you know once it is available in connect.
Sorry for delay.
Can any one please provide the solution for this
Thanks
T.Somswaran
This worked for me in uipath. Just kept “Rand” s type as random.