Icon

loop demo

Workflow Control - Solution

Solution to exercise 11 for the KNIME Analytics Platform for Data Wranglers course
- Write subsets of a file using a loop
- Read and concatenate many files using a loop
- Activate a workflow branch based on a user selection

Loop demo: Concatenate Multiple Excel SheetsGoal: Create a loop that reads and concatenates all the sheets in an Excel file. - Create a table that contains all sheet names (Read Excel Sheet Names node) - Start a loop that iterates over the sheet names (Table Row to Variable Loop Start node) - Read the Excel sheet with the sheet name in the current iteration (Excel Reader node) Tip: Use the flow variable created by the Table Row to Variable Loop node to control the setting sheet_name in the FlowVariable tab - Close the loop and concatenate the tables from the different iterations (Loop End node) Create table withall sheet namesRead one sheet perinterationLoop overall sheet namesCombine all sheetsinto single table Read ExcelSheet Names Excel Reader Table Row ToVariable Loop Start Loop End Loop demo: Concatenate Multiple Excel SheetsGoal: Create a loop that reads and concatenates all the sheets in an Excel file. - Create a table that contains all sheet names (Read Excel Sheet Names node) - Start a loop that iterates over the sheet names (Table Row to Variable Loop Start node) - Read the Excel sheet with the sheet name in the current iteration (Excel Reader node) Tip: Use the flow variable created by the Table Row to Variable Loop node to control the setting sheet_name in the FlowVariable tab - Close the loop and concatenate the tables from the different iterations (Loop End node) Create table withall sheet namesRead one sheet perinterationLoop overall sheet namesCombine all sheetsinto single table Read ExcelSheet Names Excel Reader Table Row ToVariable Loop Start Loop End

Nodes

Extensions

Links