Flow Variable

Hi guys,

I would like to automate my workflow, but there are some little problems.
I have two Excel files with customer information which need to be edited. The files are in different folders on my hard disk. The Excel files go through the same workflow and in the last step they should be stored in the same folder as the original files.
For this last step I need a flow variable to select the directory in the “create file name” node. But I do not have any idea how to create this variable …
Does anyone have an idea?

Thank you very much!

Hi @dz2709,

In the configuration window of the Excel Reader nodes, go the Flow Variables tab and set a variable name for the “XLS_LOCATION” option. Then you can use the variables to feed the Create File Name node by splitting the file names and the locations. Or you can use the variables and pass them to the Excel Writer node directly to replace the files.

Here you can learn more about making use of flow variables in KNIME:

:blush:

P.S. To remove the file name from the path you can use a String Manipulation (Variable) node and use this expression:
regexReplace($${Sfile_path}$$, "(.*)\\\\.*", "$1")

4 Likes

Thank you!
It works!

2 Likes

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