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
Follow this approach
- Read the Excel file:
Use theRead Range
activity to read the entire sheet into a DataTable variable (e.g.,dtInput
). - Filter the rows using LINQ in VB.NET:
Use anAssign
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()
- 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.