# Parallel-process multiple Excel files by sheet name in a single KNIME workflow

**URL:** <https://forum.knime.com/t/parallel-process-multiple-excel-files-by-sheet-name-in-a-single-knime-workflow/84126>\
**Category:** KNIME Analytics Platform\
**Created:** [October 28, 2024, 5:38am UTC](https://forum.knime.com/t/parallel-process-multiple-excel-files-by-sheet-name-in-a-single-knime-workflow/84126 "2024-10-28T05:38:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![san\_98](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/e47c2d/32.png) [@san\_98](https://forum.knime.com/u/san_98)\
**Post date:** [October 28, 2024, 5:38am UTC](https://forum.knime.com/t/parallel-process-multiple-excel-files-by-sheet-name-in-a-single-knime-workflow/84126/1 "2024-10-28T05:38:32Z")

</div>

Hi

I have multiple Excel files in a folder and want to process them in parallel in a single KNIME workflow. Each file should be processed based on its sheet names not file names: if a file has a specific sheet name, it should follow a particular workflow path. I want to have each file and its matching sheet name run concurrently. Please let me know starting few nodes for this.

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [October 28, 2024, 7:04am UTC](https://forum.knime.com/t/parallel-process-multiple-excel-files-by-sheet-name-in-a-single-knime-workflow/84126/2 "2024-10-28T07:04:46Z")

</div>

@san_98 from what I recall we had a similar thread about parallel processes

> [@Parallel Processing of Multiple Excel Files Based on Dynamic Sheet Names from List Files/Folders Node in KNIME](https://forum.knime.com/t/parallel-processing-of-multiple-excel-files-based-on-dynamic-sheet-names-from-list-files-folders-node-in-knime/84034/7):
>
> @san_98 In your screenshot I do not see any Parallel Chunks and no database access, but if you are fine we are fine slight_smile For the fun of it I expanded on @MartinDDDD workflow and constructed a parallel access with a database node calling sub-workflow(s) that would then use this connection. So far it seems to work although any benefits in speed might depend heavily on the actual database(-connetion) supporting parallel access. The callee workflow does look like this:

Maybe you can combine it with these information

> [@Create individual excel files from multiple worksheets](https://forum.knime.com/t/create-individual-excel-files-from-multiple-worksheets/78171/2):
>
> @lazaronewhall17 yes this can be done. With such tasks you can combine several nodes into a system to handle your files. You read the Excel Sheet names and feed them into a Table Row to Variable Loop start to iterate over them (you can expand this obviously to several files). You [create Path variables](https://forum.knime.com/t/write-multiple-csv-file-to-a-loop/44989/2) for a new sub-folder: Using the name of the “Sheet” as Folder name from the Flow Variable (you can use other things too, or you can just skip this part): [image] You then c…

---

<div class="post-metadata">

**Author:** ![san\_98](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/e47c2d/32.png) [@san\_98](https://forum.knime.com/u/san_98)\
**Post date:** [October 28, 2024, 10:48am UTC](https://forum.knime.com/t/parallel-process-multiple-excel-files-by-sheet-name-in-a-single-knime-workflow/84126/3 "2024-10-28T10:48:34Z")

</div>

Hi @mlauber71 ,

Thanks for the quick response.

The issue is that using the “Read Excel Sheet Name” function on multiple large files takes over 15 minutes just to retrieve the sheet names. Is there a way to add a condition node that checks the sheet name, and if it matches a specified name, proceeds to read only that specific sheet?

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [October 28, 2024, 12:24pm UTC](https://forum.knime.com/t/parallel-process-multiple-excel-files-by-sheet-name-in-a-single-knime-workflow/84126/4 "2024-10-28T12:24:19Z")

</div>

@san_98 this sounds strange. Have you tried listing all Excel Files and all sheet names like this:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/0/0/0090cf93e089bbf83f752099a491237282464325.png)

and then you can employ Row Filters to the sheet names.

Next option would be to employ Python Script:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/d/9/d99bd59009c19db45447a1ea43d7fd01611fa9a8.png)

> **[Excel - Unzip and List all Excel Files and Sheets in a Folder – mlauber71](https://hub.knime.com/mlauber71/spaces/Examples/Excel%20-%20Unzip%20and%20List%20all%20Excel%20Files%20and%20Sheets%20in%20a%20Folder~pcLBysPSShCGb9dp/current-state)**
>
> List all Sheets in an Excel File with KNIME nodes and Python Script Node

---

<div class="post-metadata">

**Author:** ![san\_98](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/e47c2d/32.png) [@san\_98](https://forum.knime.com/u/san_98)\
**Post date:** [October 28, 2024, 12:39pm UTC](https://forum.knime.com/t/parallel-process-multiple-excel-files-by-sheet-name-in-a-single-knime-workflow/84126/5 "2024-10-28T12:39:22Z")

</div>

Hi @mlauber71 ,

I’ve attempted the same approach and to list all files. However, the challenge is that with a large number of high-volume files, the process becomes time-consuming. We’re working on a bulk data upload and aim to complete the process quickly. I’ve attached a workflow image for reference. Could you assist with optimizing this?

 ![{2C6706B2-9079-4D4A-9527-784B23C86ACF}](https://forum-cdn.knime.com/uploads/default/original/3X/0/9/095ff347e1fa91388c8cd009810b6f80b64d38cd.png)

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [October 28, 2024, 12:50pm UTC](https://forum.knime.com/t/parallel-process-multiple-excel-files-by-sheet-name-in-a-single-knime-workflow/84126/6 "2024-10-28T12:50:21Z")

</div>

@san_98 we had a similar discussion before. Not sure if this is a bot thing? My suggestion: you try to plan out what it is you want to do - which data do you want to transfer where? For transfer zipping might be and option, also to do this in chunks, maybe.

> [@Parallel Processing of Multiple Excel Files Based on Dynamic Sheet Names from List Files/Folders Node in KNIME](https://forum.knime.com/t/parallel-processing-of-multiple-excel-files-based-on-dynamic-sheet-names-from-list-files-folders-node-in-knime/84034/6):
>
> I used the List Files/Folders node to retrieve all the files available in the folder, regardless of the file name. Then, I used the sheet name to read all the available sheets in the Excel files. In my case, I will have more than three sheets in the Excel file. After retrieving the sheets, I applied the Rule Engine node to split the workflow based on conditions. If the sheet names are the same, the workflow runs in a loop to process the sheets. If the sheet names are different, the workflow ru…

---

<div class="post-metadata">

**Author:** ![san\_98](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/e47c2d/32.png) [@san\_98](https://forum.knime.com/u/san_98)\
**Post date:** [October 30, 2024, 4:17am UTC](https://forum.knime.com/t/parallel-process-multiple-excel-files-by-sheet-name-in-a-single-knime-workflow/84126/7 "2024-10-30T04:17:08Z")

</div>

Hello @mlauber71 ,

I have multiple Excel files with large datasets, each containing a maximum of 2 sheets. I want to read all these files and then read the sheet names within each Excel file. The data from each sheet will be transferred to a designated SQL Server table, with a different table assigned to each sheet. For instance, if there are three Excel files in the folder, the data from the first Excel file will be loaded into Table1, the second file’s data into Table2, and the third file’s data into Table3. This process should run in parallel for efficiency.

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [November 6, 2024, 4:17am UTC](https://forum.knime.com/t/parallel-process-multiple-excel-files-by-sheet-name-in-a-single-knime-workflow/84126/8 "2024-11-06T04:17:20Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
