Extract filepath as a column for each excel file the Excel Reader reads

Hello,
I am using the Excel reader, in order to read multiple excel files, which are located into different subfolders. The number of the excel files is not standard (the number of the excel files is getting increased).
I was trying to figure out an easy way to distinguish the data being fetched from each file because the Excel reader will merge them all in a table.
The easiest way for me to do it, is to fetch the filepath and somehow insert it in a new Column (ex.filepath) which will contain the file path for each and every one of those rows.
Although, i was not able to find a way to do this. Could you please help me?

Thank you

Hi there,

Use Constant Value Column node which should be controlled with flow variable holding file path to add this info into new column. Should do the trick :wink:

Br,
Ivan

1 Like

You could take a look at this example. Maybe it does not need al the components:

If you need more meta information from your files and paths. KNIME also offers a wide array of nodes for that:

3 Likes

Thank you both for your help!
Works for me now :slight_smile:

2 Likes

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