How to make 1st row as a Column headers

Please help me making the 1st row as a column headers.

Hello @Mukesh_Hatwar,

take a look at this topic:

How are you importing data into KNIME? Asking cause most of the Reader nodes have option to specify which row contains header names…

Br,
Ivan

2 Likes

The question from @ipazin is a valid one.

Thank you for the response. Imported the excel file, and then cleaned the top 6 rows by applying row filter and there I have the 1st row which needs to be made the column header. Before applying the row filter node it was at 7th row. As you said, most Reader nodes hace option to specify which row contains header name but that is not working for me. Don’t know why. I will share the snippet.

Hello @Mukesh_Hatwar,

you should be able to specify it with Excel Reader and even filter out first six rows so you don’t need Row Filter node…

Br,
Ivan

I did try but not working. here are the snippets.


Hello @Mukesh_Hatwar,

I see. That is weird. You can check File Content tab (next to Preview) to see your Excel file structure. Maybe you have hidden rows that are taken into consideration. Alternatively if you can share Excel file I can give it a try. (If data is confidential replace it with dummy and couple of rows columns will be sufficient.)

Br,
Ivan

1 Like

Hi @Mukesh_Hatwar , that’s usually the case with some Excel files.

Basically, you just need to play around with these settings:

1 Like

I created an Excel file to simulate yours, and the default settings for the Excel Reader will give me this (Similar as yours):

Play around with the settings:

The lines before the headers line have been skipped, and the line containing the headers are now the headers

2 Likes

Thank You very much. It worked. your help means a lot to me. :pray: :handshake:

1 Like

Thank you very much for your time. it worked while I was on the verge of creating a dummy for you. :handshake:

1 Like

Gald to hear that @Mukesh_Hatwar and big tnx to @bruno29a :slight_smile:
Ivan

2 Likes

Seems to be a bug? Can you point out which kind of excel files. Have not seen this behavior before.
Thx

1 Like

Hi @Daniel_Weikert , it’s not a bug per se. I’ve seen some of the Excel files containing these, I don’t know when or in what situation they produce.

I also don’t know if Excel itself bypass these lines or not.

1 Like

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