Unable to filter the data from the excel

Hi, I am trying to filter the data based on the columns name, but when I give the same column name in the Filter Data Table it’s showing me Column Name is not set or Invalid.

Note. I am reading the data from the 11th row itself.

Actually, I have huge data in an excel.csv file. I am using filter the data from the 11th row based on the Column Name, and want to save in a new excel file.

@Palaniyappan @HareeshMR @Lahiru.Fernando @indra

1 Like

HI @balkishan

Can I see the headers of your excel and how you have configured your filter data table activity?

Additionally, also make sure in the read range, you have ticked the include headers…

1 Like

@balkishan,

Are you sure you have checked the Add headers while reading the range?

or, there may be some spaces in the column names, so try copy and pasting the names from excel :slight_smile:

1 Like

This is my excel headers, I am reading the data from the 11th row so that I can used the filter and it’s easy for bot to understand the header. Bcz I have to filter from the 11th row only.

If you see the 3rd column is type, I want to filter only type column and need only the Order and Shipping Services from this. If you can see Services are there below the type column, but I want to keep only Order & Shipping Services. And copy the complete data in a new excel file.
image

yes bro.

There is a new line after the name type there @balkishan

We already discussed this earlier :slight_smile:

1 Like

But didn’t resolve the issue, bcz I was busy with some other work. So I am working now on this.

@balkishan You can see in the filter data table column type there is one space you remove that

1 Like

Just try after removing the space and newline after the column name manually just to check if that is the reason @balkishan

1 Like

Fine
we can mention the column index as well like how we do in the assign activity
0 for the first column and rest
Kindly try mentioning the column index in the filter datatable wizard and let know for any queries or clarification
Hope this would help you
Cheers @balkishan

2 Likes

same error showing, I mentioned “2” in the field.

if you these are headers data, and the type is in the 2 position.

1 Like

same error after removed the space.

No just 2 not “2” buddy
Cheers @balkishan

1 Like

Yes, it worked but not given me the filtered data, It’s showing only Headers name in the NewDT.
But I want data from the 12th row to till end.

Give me the empty excel file.

1 Like

Fine may I know what are the conditions used in the filter wizard
Cheers @balkishan

1 Like

image

1 Like

The we can try with a simple Select method
Like
dt = dt.Select(“ [columnname] = ‘yourvalue’ AND [columnname] = ‘yourvalue’ “ ).CopyToDatatable()

Make sure the column name is meant correctly
Is there any space before and after type in the columnname
We can check that with
Yourcolumnname.ToString.Length
If it is five then there is a space so kindly check that with the writeline before using this select method
Cheers @balkishan

1 Like

Row(2).ToString.Length.Tostring
Cheers @balkishan

1 Like

It’s showing me 12

1 Like

Hmm
Write like
row(2).ToString.Length.Tostring +” “ +row(2).ToString

Cheers @balkishan

1 Like