Icon

KNIME_​data collection update3

Run this top part FIRST to collect thenames of files and sheets.Open the output table from Loop End andmanually copy to clipboard the data Remember to DELETE the destination XLSX asthe workflow below will only write to sheets asthey are found. It will not delete any existingsheets! Paste the output from the above LOOPEND into the Table Creator. Put"Y" (capital) again0st those sheets youwish to remove (i.e. not copy from thesource files to the destination.) Node 612Path flow variable isalready present hereas it is the path of the current file being readThis creates Path and Sheetcolumn namesRename Path column to FilePathto avoid later confusion between"Path" variable already created in outer loopand a new "Path" variable that would be created by the "Table Row to Variable Loop Start"Set Path, Sheet Name and Sheet Selectionfrom flow variables:FilePath,SheetSheetSelectionOptionSet "SheetSelectionOption" flow variableto "NAME" in case Excel Reader option is getting set back to "FIRST"Node 632Rename Path column to FilePathto avoid later confusion between"Path" variable already created in outer loopand a new "Path" variable that would be created by the "Table Row to Variable Loop Start"Node 634Node 635This now creates flow variables:FilePathSheetThis creates Path and Sheetcolumn namesNode 638Path flow variable isalready present hereas it is the path of the current file being readCollect Combined list of File paths and sheetsAdd a "Remove Sheet" columnPaste output from first flow intothis table, and set "Remove Sheet" to "Y" for all sheets to be removed(i.e. not copied)EXCLUDE all paths/sheets where REMOVE="Y"Only matches where the path/sheet is requiredNeed a String copyof the pathto allow joiningSkip loop if we have no sheetsto processfor this fileEnd the bypassDelete the spreadsheet thatwill contain the output List Files/Folders Table Row ToVariable Loop Start Read ExcelSheet Names Column Rename Excel Reader String Manipulation(Variable) Loop End Column Rename Variable Loop End List Files/Folders Table Row ToVariable Loop Start Read ExcelSheet Names Excel Writer Table Row ToVariable Loop Start Loop End ConstantValue Column Table Creator Row Filter Joiner Path to String Empty Table Switch End IF DeleteFiles/Folders Run this top part FIRST to collect thenames of files and sheets.Open the output table from Loop End andmanually copy to clipboard the data Remember to DELETE the destination XLSX asthe workflow below will only write to sheets asthey are found. It will not delete any existingsheets! Paste the output from the above LOOPEND into the Table Creator. Put"Y" (capital) again0st those sheets youwish to remove (i.e. not copy from thesource files to the destination.) Node 612Path flow variable isalready present hereas it is the path of the current file being readThis creates Path and Sheetcolumn namesRename Path column to FilePathto avoid later confusion between"Path" variable already created in outer loopand a new "Path" variable that would be created by the "Table Row to Variable Loop Start"Set Path, Sheet Name and Sheet Selectionfrom flow variables:FilePath,SheetSheetSelectionOptionSet "SheetSelectionOption" flow variableto "NAME" in case Excel Reader option is getting set back to "FIRST"Node 632Rename Path column to FilePathto avoid later confusion between"Path" variable already created in outer loopand a new "Path" variable that would be created by the "Table Row to Variable Loop Start"Node 634Node 635This now creates flow variables:FilePathSheetThis creates Path and Sheetcolumn namesNode 638Path flow variable isalready present hereas it is the path of the current file being readCollect Combined list of File paths and sheetsAdd a "Remove Sheet" columnPaste output from first flow intothis table, and set "Remove Sheet" to "Y" for all sheets to be removed(i.e. not copied)EXCLUDE all paths/sheets where REMOVE="Y"Only matches where the path/sheet is requiredNeed a String copyof the pathto allow joiningSkip loop if we have no sheetsto processfor this fileEnd the bypassDelete the spreadsheet thatwill contain the outputList Files/Folders Table Row ToVariable Loop Start Read ExcelSheet Names Column Rename Excel Reader String Manipulation(Variable) Loop End Column Rename Variable Loop End List Files/Folders Table Row ToVariable Loop Start Read ExcelSheet Names Excel Writer Table Row ToVariable Loop Start Loop End ConstantValue Column Table Creator Row Filter Joiner Path to String Empty Table Switch End IF DeleteFiles/Folders

Nodes

Extensions

Links