Remove Row with empty cell and result in duplicate row

I have tried 3 way to remove
1 using code yourdatatable = yourdatatable.Select("[yourcolumnname] <> ‘’ ").CopyToDatatable() to remove row with empty cell value and
2 Filter datatable to remove row with column name = “”
3 Filter datatable column name is empty.

All end up the same result.

Capture1
Capture2

I have no idea why duplicate will happen, i have done the same in another file which is working fine without duplicate row. The amount of duplicate rows is equal to the number of rows that have deleted.

Can you share the sample input excel file?

testfile.xlsx (9.0 KB)

Hi @Anneng ,

Can you try this

(From row in outD.AsEnumerable() Where Not String.IsNullOrEmpty(row(1).ToString) Select row).CopyToDataTable()

Cheers

1 Like

Hi, i’m very basic user, can you help by giving me a screenshot how to insert this code?

Just use Right range and Paste the above Syntax like below screenshot

image

Capture3

I getting worried now. is it my uipath having issue? You can see the code is exactly the same as you type and the result has duplicate row too.

I solved the problem, after filter add a delete range and write range, as such no duplicate row will be created.

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