I need to filter to get only 10 digit number rows in excel

Hi Guys,
I need a solution for this, I want to filter only the rows containing 10 digit numbers using filter data table activity.
Suggest a method to get it.

@Gopi_Krishna1,

Filter Datatable have very basic filters. You will have to use LINQ for this.

filteredDataTable = inputDataTable.AsEnumerable().Where(Function(row) Len(row("ColumnName").ToString())=10).CopyToDataTable()

Thanks,
Ashok :slight_smile:

1 Like

@Gopi_Krishna1

 filteredRows = dt.AsEnumerable().Where(Function(row) Regex.IsMatch(row("Numbers").ToString(), "^\d{10}$")).CopyToDataTable()

1 Like

Than you so much getting the expected results.

1 Like

Thanks for your expression too.

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