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.
I found the following post which may be of assistance. Take a look at this and see if the explanations given there help you.
Hi, I’m relatively new to Knime – I’ve reached the point where I want to create workflows which automatically populate filenames with the current date and so on.
My understanding is that this is done in knime using flow variables, but nothing i have done works. In presentation, my problem appears to be that when i click on the variable button to the right of the browse button (when setting the output path and filename for the Excel Writer) the ‘Use Variable’ checkbox appears to be permanently d…
In essence, this is an example series of nodes based on the ideas given in that thread:
I’ve put together a similar workflow as an example:
@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.
FlowVariableAsOutputFilename Several Sheets.knwf (48.5 KB)
@mauuuuu5 , you can check these threads and their example workflows that may help:
I’m trying to create a workflow to write to various sheets in an Excel file, based on a user selection of databases to query.
For example, we have 10 database tables that a user might want to query data from. Let’s just call them Info1, Info2, Info3, etc. A user might want Info2, Info4, and Info7 for account 33388. I’d like them to just enter 33388 into a string configuration node, and then check the boxes next to Info2, Info4, and Info7, and it would generate an Excel file with three tabs, nam…
I need a little help with writing an excel file with multiple sheets. I tried using a previous workflow someone had posted but the nodes are now deprecated.
I have this table
and would like to make a loop that writes an excel file like this:
Since there are only two sheets I could do it manually but I have another table that would require 15 sheets. I attach my workflow below.
Help_excel_sheets.knar (146.0 KB)
Would greatly appreciate any help.
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.
Excel Writer - Variable Sheets.knwf (46.5 KB)
@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:
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.
@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”
@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.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.