If you set the Sheet Name with an incoming flow variable, the returned data will be from the correct sheet but the column names will be those of the selected sheet in the UI.
You got the same problem when passing Column/From To/From by flow variables.
thanks for reporting this, I was able to reproduce it. The technical explanation of the bug is that the table spec is created and saved when the preview in the dialog is created. Unless the path to the file that should be read is not changed, the spec is not re-calculated during node execution. We definitely need to fix this and it needs also be re-calculated if a config is changed that affects the spec.
A workaround that hopefully works for you - although not pretty and nice at all - is to also control the path via flow variable. During the configuration of the dialog, this path needs to be different than during the execution. This leads to re-calculation of the spec. Take a look at the String to Path (Variable) node, it might be helpful for you.
Could look e.g. like this:
Let me know if you have any issues or questions regarding that workaround. I will let you know once this bug is fixed.
Best,
Simon
Edit: The issue has been fixed with a new option and the workaround is not required anymore, see below post.
Iâve tried your workaround but it doesnât really help.
While trying your solution, I discovered another unexpected behaviour :
When the excel file path changes, some UI settings are reset to default.
So if you set, in the UI, âSheet selectionâ to âSelect sheet with nameâ, once you change the file path it comes back to âSelect first sheet with dataâ.
I understand that is it related to a âtight couplingâ between all these parameters and the preview (maybe a ârefresh buttonâ is unavoidable ?)
Agree, that could be improved. Weâll look into it. (It was actually the same behavior for the old node, the sheet selection was reset when the file was changed.)
Sorry, it actually does the job but only once.
Once the file path has been used, there is no way of changing anything without changing the path again and thatâs, in my use case, not a viable solution.
I would not say that it is exactly the same :
In the old node, you just have a reset of the drop-down menu, but here, in the new node, you have the âsheet_selectionâ variable that changes from âNAMEâ to âFIRSTâ, so you are loosing your sheet choice policy.
Once the node is configured (with a âfalseâ path), it should work, doesnât it? If you need to re-configure the node, you would have to set the variable path controlling the node to a âfalseâ one first, thatâs true and for sure annoying. I just canât think of another workaround for now.
Totally agree with that one. Are you controlling this settings via flow variables? If yes, what is the use case? (Did you actually look into the xml file to get the strings that are used to control this setting? )
just writing to let you know that we have added a option to the Excel Reader in v4.3.1 which can be found in the Advanced Settings tab and is called âSupport changing file schemasâ. If you check this option, the issue you have encountered is fixed as the data spec will be re-calculated in every execution. So the workaround is not required anymore.
Hi all - Iâm experiencing something similar. I tried turning on this setting in Advanced Settings, however, my flow variables still arenât an option as input. Any suggestions?
@SimonS
I have the same problem with several nodes. The changing file schema should be activated by standard. I have to guess what the right schema is for every node
For example: The âCreate Folderâ node does not work with a custom created url, the checkbox is greyed out.
regarding your Create Folder problem. Is this a knime url your trying to work with? In general it is not possible to create folders for âURL file systemsâ.
If youâre still using the knime protocol may I ask why youâre doing so (did we miss some nodes to make your use-case work)?
I changed the concept of the WF a little bit and this solved the problem. But thanks for the quick reply!
But now I have another problem with the new file handling which is a little bit off topic:
Because several nodes do not support the new file handling right now (like sdf writer etc) it would be great to have a converter node from the new âpathâ type (local file system, mountpoint etc) to string. The âPath to Stringâ node only redefines the cell type but for example a conversion from a mountpoint path to string will result in an incomplete URL (the mountpoint reference is missing in the string). If I want to save a file to this path I of course get an error.
what exactly do you mean with âthe mountpoint reference is missing in the stringâ? If you are having a Path using âRelative to current mountpointâ, you should get a string starting with âknime://knime.mountpoint/âŚâ. So it will also be relative to the current mountpoint. If you have âMountpointâ selected as file system, you get a string like âknime://your_mountpoint/âŚâ which always points to exactly the same mountpoint (here a mountpoint with the name âyour_mountpointâ).
@SimonS@Mark_Ortmann Hi - Hereâs another screenshot of my flow variables one node before the excel reader. I didnât change anything except upgrade to R4.3. After the upgrade, my flow variables stopped working. I tried turning on that setting in advanced settings, however, that didnât resolve my issue. Any suggestions on why I donât even have the option of selecting a variable as shown in my previous screenshot? Normally I could at the very least select âknimespaceâ.
this has nothing to do with the settings in the Advanced tab. We introduced a new variable type for paths for the new reader nodes, so you would need to convert your string variables to such path variables using the String to Path (Variable) node, see also this post.
Where do you have these variables actually from? The variable names let me assume you are using the legacy File Upload node. If so, you can exchange it with the File Upload Widget node which outputs a path flow variable.
@SimonS Thanks for your quick response! I integrated my workflow with the webportal so I get the file path from there (screenshot is updated since I added in the new upload widget feeding into the excel reader). Is the new widget webportal compatible?
Also is the new Create Temp Folder the same as the legacy Create Temp Dir node? Do I need to call out a folder location if Iâm using the webportal? I see thatâs new/different than the temp dir node.
yes, the File Upload Widget node is compatible with the new file handling. It outputs a path variable that can be used to configure the Excel node.
Yes, thatâs right. In your screenshot, the node is configured to create a temp directory within your workflow that will be deleted when you reset the node or close the workflow.