I want to filter all the values in the column A of the excel

Hi everyone,
I want to filter all the values in column A where the condition is that value should be like this “A234” “G234” where one alphabet followed by three numbers, so based on this condition I want all the rows and past it in another excel

@Gopi_Krishna1,

Follow this approach

  1. Read the Excel file:
    Use the Read Range activity to read the entire sheet into a DataTable variable (e.g., dtInput).
  2. Filter the rows using LINQ in VB.NET:
    Use an Assign activity to filter the DataTable.
    Utilize LINQ to filter the rows based on the regex condition ^[A-Z]\d{3}$.
dtFiltered = (From row In dtInput.AsEnumerable()
            Where System.Text.RegularExpressions.Regex.IsMatch(row.Field(Of String)("ClumnName"), "^[A-Z]\d{3}$")
            Select row).CopyToDataTable()
  1. Write the filtered data to another Excel file

Super its working fine thank you @ashokkarale

1 Like

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