Delete data row from data table



@aksh1yadav Thanks Akash for sharp reply. Its working now :slight_smile:


Hi I have a task in which i have build a data table. Now the is one column Aging (Double) now i have to filter data condition is: if row(“Aging”) is greater than 0.35
then populate data table with these values.
Please help @aksh1yadav @


Hi, question, I tried your solution, but I get an error saying
“‘DataRowCollection’ does not have a public instance method named ‘Remove’ matching the parameter types, generic type arguments, and generic type constraints supplied to InvokeMethod ‘Invoke method’”

I did see you filled in the parameters of the invoke method, but when I do that I get another error, on the item, saying:
“Compiler error(s) encountered processing expression “item”. Option Strict On disallows implicit conversions from ‘Object’ to ‘System.Data.DataRow’.”

As far as I can tell I did everything just like you did it. Do you know of anything I might be overlooking?

Thanks in advance!


According to this page (, you would type “Aging>0.35” instead of the “[Status]=‘PV’” part in the select method.

Hope that works for you!


You have to change the Datatype of your argument to System.Data.DataRow.



You mean the Datatype of the value in the parameters? Or the datatype of the “item” in the for each loop? Cause they both are datarows allready as far as I know. Item is an item from an array of datarows, and the value is also set as a datarow. It is exactly the same as in your example, but somehow it doesn’t recognize the item as a datarow it seems…


Will you be able to share your sample workflow and screenshot if possible?



I can’t send the workflow because of the client, but it works very similar compared to you example. Here are some screenshots to show the process and the variables.

Thanks in advance!


Change your ForEach TypeArgument to System.Data.DataRow, you’ve left the default Object there.


Aah, yes, that’s it, thanks! :smiley:


Hi everyone i need help with workflow

1.I have one excel file with column name Post Eutran
now i need to read all string under this column. each string in column i have to check first 3 letter and Sort and Add it under specific column based on Logic sheet.
Like if String.substring(0,3)= ALL then Paste this string Under column akr1e3.

Please help File attached
@Mr_JDavey @aksh1yadav Book1.xlsx (10.9 KB)


I need to select only those rows which match with the value set in variable. How do I put it in Select?
For eg: data.Select("[COLUMN NAME] = {SOME VARIABLE}")
How do I use variable instead of hard coded value?


Hi @shrutika,

strvalue->string variable
strvalue="SOME Value"
data=data.Select("[COLUMN NAME] ='"+strvalue+"'").CopyToDataTable()

Regards, Arivu :slight_smile:


Thank you. Works as expected


Is there a way to filter or copy data rows based on Index from a datatable.


HI @niteshvnr,
Try below code


Regards, Arivu :slight_smile:



What about a list of variables?
I have a string of numbers: “21530,22035,22009”
I split them by {","}
so I got a string badList
now I want to pass them into
dataRow dataRemove ="[Durien] = ‘"+b+"’")

instead of b but badList. I am thinking to use forloop but then the dataRemove value will be updated to select the 22009 rows only right?

I want it to select all the rows that contains 21530,22035,22009. Thanks

testDelete.xlsx (11.7 KB)
deleteInExcel.xaml (19.2 KB)

Edit: I used a nested for each loop and solved it! Thanks


Hi @lavint,

To remove the multiple rows by select condition. It has custom activity called “Remove Data Row Select” From BalaReva.DataTable.Activities. Below you can take more detail .



I like this approach!
If I would like to do the exact same thing, except for replacing the “Status” column name by the index number of the column, what should I change? I have been trying some stuff but it didn’t work unfortunately.


Hi @trabart,

You can apply like this

 dataTable.Select("[" + dataTable.Columns[0].ColumnName + "] = 1")