Flow Variables - Usage - Excel Writer - Filename

Hi,
as a beginner/newbie I have a question about using flow variables.

I have created two flow variables. One of them is usable at the Row Filter node, as expected.

The second flow variable (the filename of the output file) is not offered when configuring the filename of the XLSX file.

Since I want to write multiple spreadsheets (sheets) to one XLSX file in this workflow, controlling the filename via a flow variable would be a great time saver.

Thanks for your support.

Hi @alfkah,

I found the following post which may be of assistance. Take a look at this and see if the explanations given there help you.

1 Like

In essence, this is an example series of nodes based on the ideas given in that thread:

3 Likes

I’ve put together a similar workflow as an example:

1 Like

Hi @takbb thank you for the workflow, I beg if you can help me. I am trying to write several Excel sheets into a single file, but I am unable to get the proper path.

Let’s say that the file is located into C:\ and the workflow is: C:\Users\User\knime-workspace.

I am uploading a workflow that is slightly modified from yours.

Thank you

FlowVariableAsOutputFilename Several Sheets.knwf (48.5 KB)

Hi @mauuuuu5 , you can check these threads and their example workflows that may help:

1 Like

Hi Bruno thank you I cannot manage to write the excel file into my Desktop, I am attaching you a workflow with an excel deprecated node, just want to know how can I use it with the current excel node.

Thank you

MauExcel Writer - Variable Sheets.knwf (46.5 KB)

Hi @mauuuuu5 , I checked the workflow you uploaded, the one you modified from mine, it looks like it ran properly (it’s in green state).

Can you let me know what the issue is? It’s going to be hard to play around with legacy nodes. Any reasons why you want to use Legacy nodes?

Just a comment, you don’t need to link these 2 nodes twice:
image

You can remove the top link.

I also checked your version of @takbb 's node. Your issue there is that your String to Path (Variable) is creating a path Relative to the workflow data area, which is basically the data folder under the Workflow, while you are trying to write to an absolute path “C:\File.xlsx”:

You just need to change it to Local File System like this:

And it will create the proper path for you.

3 Likes

Hi @bruno29a thank you for your help, that was the trick. I had to change the node because for no reason the old node shows “Execute Failed: Failed to read zip entry source”

Best regards

3 Likes

Hi @mauuuuu5 , I’m sorry that I somehow didn’t spot your message but I’m glad you’re sorted, and my thanks to @bruno29a for the (as always) comprehensive assistance and expertise.

4 Likes

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