Enforce Column Names on Types in Excel Reader

Hello Fellow KNIMErs,

I have a workflow which uses excel reader nodes to read excel files from a pre-defined directory where users deposit excel files. Due to the manual nature of users assemble the excel files, there is a high likelihood that, at some point, column names will be inadvertently changed or columns will be added or column data types will be changed. The files all have the same prefix in the name…I use the wildcard option for the file name in the filter options in excel reader. I’m looking for a quick way to enforce the column names, column data types, and number of columns be enforced such that it is always the same…something I would configure I gather. I’m wondering if checking “Fail if specs differ” on the Excel Reader Advanced Settings tab would give me everything I need in this case?

Any and all assistance or direction greatly appreciated.

Thanks so much.


@chrisgranelli I think you could combine the fail if the specs differ with a try-catch approach so your import will continue and you can later list (and maybe correct) the files which failed.

Here is a slightly different example how such a thing could work:

If you want to do something different in the first loop this is also possible with a case node:

1 Like

Hi @chrisgranelli .

Have you tried the table validator node? It ensures a certain table structure.


1 Like

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