I have to delete a row that contains a particular string variable from a data table. string variable is input from user and I need to delete a row which contains this string variable value.
string value will be a full name… single variable is enough for a full name???
hey
1 - Read Range
2 - Create a ArrayofDatarow = outDataTable.Select(“[YourColumnName]=‘yourrowvalue’”)
3 - For each loop (System.Data.DataRow) and inside loop use Remove DataRow
Cheers @rifnanahasRemoveSingleRow.xaml (7.5 KB) here is a a sample which might help you
Hi,
Can you check if TypeArgument of For Each is not object but System.Data.DataColumn?
Regards,
"[Column1] = ’ “+StrVAr+” ’ "
what is you EmployeeCopyDT variable type
and EmployeeList Variable Type
both are data tables
Did you check my workflow? @rifnanahas
okay if you are approaching that way datatableVar=datatableVar.Select(“[Column1]='”+StrVAr+"').CopyToDataTable
and use DatatableVar in writeRange
Now my error has gone. But that particular row is not deleting
sample.xaml (15.4 KB)
try nowsample.xaml (16.3 KB)
Before Trying remove that Remove Data row Activity
row is not getting deleted
give your excel and tell which row has to delete
here you go with a sample
hope its resolved
deleterows.zip (16.3 KB)
Cheers @rifnanahas
here I want to delete the row with Employee xxx. But it shouldn’t be harcoded. xxx should be stored as a string variable .EmployeeList.xls.xlsx (8.8 KB)
New folder.zip (12.8 KB)
cheers
Thank you
sorry i didnt get you!