Imported Workbook, Best Practice ?


I don’t really have a problem but I’m wondering if I use Knime, the best way.

Basically I run the same process every month.
I have one folder for each month, with the same folder structure which contains source files (a csv database and setup excel files for matching-mapping (joiner)).

What I do: I enter the subfolder in a “String Configuration” and I create Variables for each filenames (input and output filenames).

So when I want to load an excel file, I have to create a link with variables (red string).

Is there a better way to do it ? I was thinking loading of all files I need in memory and call them when needed via a node.

How do you proceed ?

Hello @Zarkoff95,

can you use List Files/Folders nodes to get all Excel files you want to read that month and then use loop to actually read them and process one by one? If all Excel files have same structure you might be able to use single Excel Reader to read all files…


1 Like

Well no,

They don’t have the same structure. It’s not that I want to concatenate all files… each file is a mapping table (example 1 is for customer mapping, 1 for product mapping,…)

Hi @Zarkoff95 , if the folder name for each month follows some pattern related to the current date, then you can automate this folder name/path instead of having to enter the subfolder name all the time. It’s still good to offer the flexibility to enter the month, so I would use this feature to override the dynamically generated name. For example, if no name is entered, the workflow should be able to know which subfolder to go to.

Creating links is ok, as long as you do not need to create them all the time. They should be set and good to go all the time. If you need to create the links all the time, that’s an issue and needs to have alternatives.

I’m still trying to figure out what part of the workflow you are trying to tweak. I get the part where you have to enter the subfolder name, for which I provided a suggestion.

For the multiple Create File Name nodes, there is a new node called Create File/Folder Variables where you can define multiple variables in the same node instead of having to have multiple individual Create File Name. However, based on your screenshot, you may not have this node since you still have Create File Name node, which in newer version is now a Legacy node. If that is the case, as an alternative, you can always try to use the Variable Expressions node to define these variables in just 1 node.

Apart from that, I can’t see what else is happening in your workflow.

EDIT: If you still want to do the manual entry for the subfolder, you can use the Local File Browser Configuration, which allows the user to browse for a file - a bit more user friendly than having to type in the folder path. This is a bit of a “hack” in that, as the node says, it will actually browse for a fie, and not for a folder. The trick is that the user can just go into the subfolder and choose any file. You can then retrieve the folder using the URL to File Path (Variable):


1 Like

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