Icon

05_​Read_​all_​sheets_​from_​an_​XLS_​file_​in_​a_​loop

Read all sheets from an XLS file in a loop

This workflow demonstrates how to read all sheets from an XML file using the XML Reader node together with the Read XLS Sheet Names node in a loop.

To read all sheets from an .xls file in a loop first add the Read XLS Sheet Names node to the workspace and chose the appropriate .xls file from the file system in the configuration dialog. The node lists all sheet names from the .xls file in a data table.

This table is used to feed the Table Row To Variable Loop Start node which takes one row from the data table in each loop and creates a flow variable from it. In the loop the created flow variable is fed into the XLS Reader as SHEET_NAME.

The Loop End node collects all the sheets by appending the rows.

This workflow reads all the sheets of an XML file using a loop. adapted example from KNIME-Hub Examples/01_Data_Access/01_Common_Type_Files/05_Read_all_sheets_from_an_XLS_file_in_a_loopworks! changed deprecated nodes to newer one (including modified settings due to changes in node config)doesn't work!in my example reads 3 times the first sheet Collects readsheetsCreates variablesfrom the rowsSet flow variable to sheetNode 10Node 11Node 12Node 13Loop End Table Row To VariableLoop Start (deprecated) Read Excel Sheet Names(XLS) (deprecated) Excel Reader (XLS)(deprecated) Read ExcelSheet Names Table Row ToVariable Loop Start Excel Reader Loop End This workflow reads all the sheets of an XML file using a loop. adapted example from KNIME-Hub Examples/01_Data_Access/01_Common_Type_Files/05_Read_all_sheets_from_an_XLS_file_in_a_loopworks! changed deprecated nodes to newer one (including modified settings due to changes in node config)doesn't work!in my example reads 3 times the first sheet Collects readsheetsCreates variablesfrom the rowsSet flow variable to sheetNode 10Node 11Node 12Node 13 Loop End Table Row To VariableLoop Start (deprecated) Read Excel Sheet Names(XLS) (deprecated) Excel Reader (XLS)(deprecated) Read ExcelSheet Names Table Row ToVariable Loop Start Excel Reader Loop End

Nodes

Extensions

Links