Top 50 Records from a DataTable

how to get Top 50 records in a table
how to use this in UiPath dt.Rows.Cast<System.Data.DataRow>().Take(50)

i have a excel with 150 records and i loaded to a datatable, i need to get just process only 50 records per day, so i was planning to load to a datatable and process 50 record and remove the records from excel,

1 Like

Dt2 = Dt1.Clone



Neat solution

Spammy :wink:

@vvaidya clone call is not necessary there, copytodatatable produces a new dt anyway.


Perfect, Thank you and elegent solution

hello all, how about bottom 3 row? Is there any shortcut, instead of manual sort dt then use the script above?