Reading all sheets of all files in a folder and create a formatted output with multiple sheets

Hi everyone,

I’m working on a complex KNIME workflow that I currently have split into two parts — but I’d really like to combine them into one.

What I’m doing:

  1. Data Preparation
    I read all sheets from all Excel files in a folder. Based on the sheet names, I categorize and write the output into a new Excel file with multiple sheets.
  2. Formatting
    In a separate workflow, I format all sheets of that output file using the Continental XLS Formatter nodes.

The challenge:

I’m struggling to properly combine both workflows, especially when it comes to closing the loop.

Has anyone successfully combined data preparation and formatting of multiple sheets in one workflow? Any tips or example workflows would be greatly appreciated!

Thanks so much!



Hi @Lorin , I gather that the upper two screenshots are your data prep workflow, and the lower screenshot is your formatting workflow.

Can you give further info on the problem you have.

You have a metanode and a component in the second workflow, so it’s difficult to gauge exactly what they are doing from just looking at screenshots.

Is it not formatting correctly, or something else? What did you mean by “especially when it comes to closing the loop” re combining workflows?

What happens if you simply attach the second workflow to the first by joining the output flow variable port of the final Loop End node (data prep workflow) to the Read Excel Sheet Names node (formatting workflow)?

3 Likes

Hi @takbb , thank you for your response — your suggestion worked!
Connecting the output flow variable port from the Loop End node to the Read Excel Sheet Names node did the trick.

However, it only works when I manually set both the Read Excel Sheet Names node and the XLS Formatter (apply) node to use the Local File System.

What I’m aiming for is a dynamic setup, where the workflow uses paths relative to the current workflow’s data area. The idea is to run the workflow on different input datasets, each saved in an output path that depends on the corresponding input data path’s name. This already works totally fine for the excel writer and now I’m somehow struggling with the output path of the XLS Formatter (apply) node…I assume I need to use flow variables for this, but I’m not sure how to set that up correctly. Any tips?

You can dynamically extract the local path and create new path variables.

2 Likes