I have Situation Like this :
I need to apply filter to the parent column which contains NA values i.e i want to apply filter on the second column not the first, When I am using Filter Datatable it says Column Parent already belongs to the data table.
How to tackle This ?
let’s assume that the data is within a data table and due to the duplicated names in the first row addheaders was ticked off.
You can use the column index (1) as it is 0 based
the generated ColumnName
Do check out this post also
One approach could be this
Read the excel without the headers
Store the values of row(0) in a string array
ColArr = dt_Data.Rows(0).ItemArray.Select(Function(c) If(c.ToString.Trim.Equals(""), "Column", c.ToString)).ToArray
Create dictionary to get the count of column names
ColCountDict = ColArr.Distinct.ToDictionary(Function(k) k, Function(v) ColArr.Count(Function(x) x.Equals(v)))
Reverse the ColArr
ColArr = ColArr.Reverse.ToArray
Iterate through the column name…
As an alternate for handling Duplicated Col Names have a look here:
I tried dong like this it didn’t work
please give us complete info:
what was done, what was expected what did fail. which data was used
I have data something like this :
What I want to do is just this
Apply filter on the Second Column and Filter Out the
#N/A Values and Paste them into another Excel sheet like this :
What I did, Tried to apply the filter through the index number of the column using the filter datatable activty but the output thrown was like this :
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.