Hi All,
I hope everyone doing good.
I Need to remove rows whose index are more than 5, someone please help me how to do so??
Thanks in advance.
Hi All,
I hope everyone doing good.
I Need to remove rows whose index are more than 5, someone please help me how to do so??
Thanks in advance.
Clarification needed!
As you need to take the only 5 rows from the datatable?
Regards
yes correct
Use the expression below!
DT.AsEnumerable.Take(5).copyToDatatable
This will fetch only five rows from the datatable
Regards
hi @HeartCatcher
if you need only 5 rows you can use something like this in assign activity
Dt2 = Dt1.Clone
Dt2=Dt1.AsEnumerable().Take(5).CopyToDataTable()
Hi @HeartCatcher,
Use an excel application scope inside it use Read Range to read the datatable say the datatable id DTBook.
use Assign activity in LHS use variable say DTModified with type as Datatable in RHS write something like DtBook.AsEnumerable().Take(5).CopyToDataTable()
which gives you DTModified = DtBook.AsEnumerable().Take(5).CopyToDataTable()
this will give you 5 rows from the starting of datatable
Thanks