This topic hints at a potential buggy behaviour in the new Excel Reader node when it comes to the sheet selection option - new as in KNIME version 4.4 and later.
I have come across a similar issue.
What I observe is that, within a loop, such as the one shown here below, the Excel Reader node sometimes unpredictably forgets or resets to default the preconfigured sheet selection option (i.e. select first sheet with data
, select sheet with name
and select sheet at index
):
In the above workflow, the file path is a controlled by a variable, while all the other options have been preconfigured based on one of the files. All the files share exactly the same sheet names and data structure per sheet type.
In versions prior to KNIME 4.4, this would never be a problem, for any preconfigured parameter would remain set as preconfigured.
With KNIME 4.4 and above, this now looks differently. Let me elaborate my suspicion.
When selecting the Excel Reader configuration screen with the red status light on, I have noticed that there is a quick “scanning” message underneath the file name. During this tiny “scanning” period, the worksheet selection option appears momentarily empty or set to something else. Given the red status light, the file path variable is obviously not populated and thus the scanning is based on the file which is used to initially preconfigure the node. Could it be that this scanning behaviour would cause the node to sometimes reset the worksheet selection option ?
Maybe I simply have to adapt my expectations and my workflow: is it still possible to preconfigure an Excel Reader
node for certain options based on a sort-of-template Excel file and to expect those options not to be automatically adapted by the node? or is it safer to provide certain options as a flow variable as well during parametrisation?
Given the experiences drawn from the aforementioned topic, in which a well documented answer was flagged as solution, I am less optimistic with parameter approach because, after all, the original poster admitted no longer being able to trace the reason for the buggy behaviour.
Before you ask me for a reproducible workflow to share here in the forum, please understand that I can unfortunately not provide you with any such workflow. This is because it is part of a much bigger workflow which is itself called by another workflow using the Call Local Workflow (Row Based)
node. The said workflow of workflows used to run flawlessly until KNIME 4.4 excluded.
Meanwhile, I will parametrise the sheet selection options and report back here, should this improve the situation. If this fails, I will go move back to the old Excel Reader node.