KNIME 4.3 - Excel Writer and flow variables

After update to KNIME 4.3 I tried to replace “deprecated” nodes e.g. Excel Writer (XSL):

snippet before

I tried this approach:

after

But Excel Writer doesn’t recognize any flow variable for file name.

What’s wrong?

Regards,
René

2 Likes

@ReWi,

could you share the workflow with us please.

1 Like

Could it be this:

1 Like

SAP2MDS_AUFM01_06.forum.knwf (12.1 KB)

3 Likes

Hi @ReWi,

it works for me when clicking on the variable button right to the “Browse…” button.


You can also set the variable on the flow variables tab under file_selection -> path.

Best,
Simon

1 Like

Hi Simon, thanks for your reply.
I’ve tested now the workflow snippet under KNIME 4.3 on my Windows 10 environment and it works also as expected.
Tomorrow I will test again in my productive environment (Ubuntu) and update the case.

Regards,
René

3 Likes

I’ve tested again under Ubuntu 18.04.5 LTS (and the updated KNIME 4.3):

Flow variables are not usable!
I’ve also deleted the snipped workflow and imported it again, same behaviour, I’m unable to use the flow variables.
Maybe it’s related to the underlying Ubuntu?
Do you need more information?

Regards,
René

@ReWi,

can you check the attached workflow SAP2MDS_AUFM01_06.forum.knwf (13.0 KB) and let me know if that solves your problem? It would also be good to get a deeper understanding what is wrong with your workflow. Is the one you used on Ubuntu any different to the one you already shared with us? If so could you please share the new version as well?

2 Likes

@Mark_Ortmann,
the workflow provided by you works. So it solves my problem, thanks.

And to your additional questions: The inital workflow (uploaded here) was the same for Ubuntu and for Windows, but only in Windows it works as expected.

Regards,
René

Was it only the excel writer that did not work? Could you share the content of the Path flow variables that have been created with us? Could you select those variables using the Variables button in the writer node? Where there any errors shown by the writer?

@Mark_Ortmann

I switched only to the new Excel Writer, because the former node was deprecated. And for me it looks like the Excel Writer node under Ubuntu doesn’t recognize the path flow variables.

The variables after the node “String to Path (Variable)” are

Windows10

Ubuntu18.04

The Excel Writer under Windows recognize and works but the same node under Ubuntu doesn’t show any usable variable. I’ve used the same workflow, only the generated paths were different (of course).

Regards,
René

Ok this is very weird, because the flow variables looks right on ubuntu. Does the CSV Reader or writer allow to select this flow variable on ubuntu?

@Mark_Ortmann
for CSV writer same problem - doesn’t see any path flow variables

Regards,
René

Ok now I’m seriously lost. Does the CSV Reader and Excel Reader see the String flow variables or anything else? May I ask what ubuntu version you’re running? Could you share the Windows and Ubuntu version of that workflow with us so I can see what the differences are. Are the KNIME installations identical?

Hi ReWi, are you using a Container or th flow is a simple workflow…

I used on a Container and had the same issue but what is did was open the configuration for the output container and include the Path as an output it works for me.

Hi chajinom,

I had used simple workflow not component.

René

Ok, in that case, what I did was use the String to Path node, the string path is the key in everything, there I Select the column that I need as the Path, in my case I filter before to get just one row so is better to select the path

then after that when you check the results of that node you will see that it will create a type of data called “P”

So when you open the table row to variable node it allows you to include that “Path” variable

and then when you connect it to excel writer node or csv writer node, it will allows you to use the variable as the Path to have the full name

Just to highlight this path should include the datatype (like .xlsx or .csv) because at the end what you are doing is saying where to export the data, before it you can play with string manipulation node to change names, or what ever you need, just let me know if is clear, if don’t I’ll try to load a workflow example

bless ya!

2 Likes

I just came across this topic having answered a similar question yesterday on the forum Flow Variables - Usage - Excel Writer - Filename

It got me intrigued to find the answer and from information that I’ve referenced on the above forum post, I put together a simple workflow example, which may be of assistance in further demonstrating the use of flow variables for the new Excel Writer.

4 Likes

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