Welcome back to our UiPath community.
- First find out all the columns whose header contains specific word as below.
arrColNames = (From c in dtInput.Columns.Cast(Of DataColumn) Where c.ColumnName.Contains("specific word") Select c.ColumnName).toArray
Here, arrColNames is of type Array of String
- And then try below expression to fetch only required rows with specific header matching columns.
dtOutput = dtInput.DefaultView.ToTable(True,arrColNames)
Note: If you want duplicate records also then write False instead of True.