Excel reader retain original column order

Hi there,

I use excel-reader to read a particular sheet from a excel file. But the order of columns is different than the file. When I inspect the output of excel reader node, I get all the columns present in the sheet but the order of the columns is not same as the file. I’ve a requirement where the column order should match the file.

Regards

@bhaveshachhada you might have to allow for “changing file schemas”:

KNIME should always take the column order from the first sheet if you read multiple sheets from one or more files. You mean you read one sheet and the order in KNIME is different from excel?

Sir, I read all the sheets from an excel file one by one in a loop. So in one iteration, I read only a single sheet from the excel file and still I got different column order than the excel file.

Not sure if I understood correctly. KNIME should pick up the order of the first sheet and not care about later sheets with different order. Is that not the case?
br

@bhaveshachhada you could makjje sure that all your tables have the same order of columns after you have imported the data.

Thanks, This worked for me.

1 Like

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