Hi together,
I have a really simple question.
I have a single Excel Reader node and I want to add the file name of the Excel-file to a constant vaule node.
How can I extract the file name from the Excel Reader node?
Thank you and best regards,
Andreas
Assign variable as on the example below and use it in Constant value.
2 Likes
ipazin
November 9, 2020, 12:04pm
3
Hello @Schmali93 ,
File_Name value depends on node’s configuration. If it’s Local File System you’ll get path and then you’ll need to extract Excel name from it. If you use Relative to option and workflow data area then you’ll get file name with extension.
Br,
Ivan
1 Like
Hi,
I suggest to you to look at @mlauber71 collection of workflows at https://hub.knime.com/mlauber71/spaces/Public/latest/kn_example_excel_import_meta_workflow
there are a lot examples… also for extracting excel file information.
3 Likes
Hi together,
thank you all for your support.
I’ve solved it as descirbed here:
I would’ve used a Chunk Loop Start node to isolate the individual rows of URLs generated by the List Files node.
The Output of this node gets split into 2 branches:
the 1st branch goes to a Table Row to Variable node which converts the URL into a variable which can then be used to tell an Excel Reader node which file to grab.
the 2nd branch leads to a Cell Splitter node with an appropriate delimiter such as the forward slash, which allows you to isolate the file name portion of the URL. You c…
Best regards,
Andreas
1 Like
system
Closed
May 11, 2021, 8:10am
6
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.