Filter Blank rows

Hello people,

Basically there are 3 columns in an excel sheet.
‘column 1’ and ‘column 2’ contain data. Column 3 contains some blank rows.
I need to filter “Col3” and use them for further process.

Tried with “Filter datatable activity” . Did not go well.

Any other way for this? Please suggest

Regards,
Nidhi K

1 Like

geting the col3 nonblanks
(From d in YourDataTableVar.AsEnumerable
Where Not (isNothing(d(“Col3”)) OrElse String.IsNullorEmpty(d(“Col3”).ToString.trim))
Select d).CopyToDataTable

geting the col3 blanks
(From d in YourDataTableVar.AsEnumerable
Where isNothing(d(“Col3”)) OrElse String.IsNullorEmpty(d(“Col3”).toString.trim)
Select d).CopyToDataTable

we would use it within assign activity

Hi
Hope this would help you resolve this

Provided with a xaml workflow

Cheers @nidhi.kowalli

1 Like

Try this

dt1.AsEnumerable().Where(Function (r) r(“column3”).ToString.Trim.Equals("")). CopyToDataTable

Regards

Nived N :robot:

What is “d” you are referring here?

it is acting like a carname to the looped datarow
Also have a look here:

Hey @NIVED_NAMBIAR

Logic you gave works fine as filter.
Its filtering blank values properly, but the thing is , its not removing the rest of the data.

I mean,
finally after applying logic, “Columm 3” is filtering by blank values and displayed at top of sheet, Rest of the data is appending.
I dont need that . How do I remove those rows?

may we ask you to share with us what you have implemented so far. So we can guide you to finalize the case. Thanks

@ppr @Palaniyappan @NIVED_NAMBIAR

Thank you guys!
I got the Output Properly!

Regards,
Nidhi k

Perfect. May we ask you to close the topic by marking the solving post as solution. So others can benefit from it. Thanks

his is showing error

try following (sometimes compiler caches are causing this issue)

(From d in YourDataTableVar.AsEnumerable
Where isNothing(d(“Col3”)) OrElse String.IsNullorEmpty(d(“Col3”).toString.trim)
Select r=d).CopyToDataTable

1 Like

not working

only details will help us. What is not working?

check updated statement

try below line of code

DT1.Select("[Col3]=’’" ).CopyToDataTable

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.