# How to read multiple excel files in one folder?

**URL:** <https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775>\
**Category:** KNIME Analytics Platform\
**Tags:** excel\
**Created:** [December 16, 2017, 2:04pm UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775 "2017-12-16T14:04:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![yjchen110](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/y/ea666f/32.png) [@yjchen110](https://forum.knime.com/u/yjchen110)\
**Post date:** [December 16, 2017, 2:04pm UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/1 "2017-12-16T14:04:03Z")

</div>

Hi, I want to use below knime flow to read 2 excels in one folder and combine them into&nbsp;1 speed sheet in a new excel. the two input excel had same template and header. But when execution, there is always an error showing as below:

Execute failed: Input table's structure differs from reference (first iteration) table: Column 7 [Delivery Q (Number (integer))] vs. [Delivery Q (Number (double))]Column 9 [Gross Weig (Number (double))] vs. [Gross Weig (String)]

So, how can I change the table structure to ensure two tables have the same characters? thanks for your help!

- [example.PNG](https://www.knime.com/sites/default/files/example.PNG)

---

<div class="post-metadata">

**Author:** ![ferry.abt](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/f/e5b9ba/32.png) [@ferry.abt](https://forum.knime.com/u/ferry.abt)\
**Post date:** [December 18, 2017, 1:31pm UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/2 "2017-12-18T13:31:59Z")

</div>

Hey yjchen110,

I think that's about the type of the columns. You can use the **Column Rename** node as well as nodes such as **String To Number** (or better **Number To String** )&nbsp;to make the column types match. That should solve the problem.

If not, please don't hesitate to come back here. Maybe you could provide some sort of sample from your files which would allow me to give a more specific answer to your problem.

Best,  
Ferry

---

<div class="post-metadata">

**Author:** ![sksuvarn](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@sksuvarn](https://forum.knime.com/u/sksuvarn)\
**Post date:** [July 31, 2018, 4:45pm UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/3 "2018-07-31T16:45:24Z")

</div>

Hello All,

I have a Folder with xls files of similar format ( Each file has 3 tabs A, B & C ). I’m trying to combing the data from these files and to export as a Master file. ( No sheet merging. The master should have tabs A, B & C)

Please check the following workflow in the image below.

 ![image](https://forum-cdn.knime.com/uploads/default/original/2X/c/caa50954818022d7602c32d0a82fe69341e637bc.png)

 ![image](https://forum-cdn.knime.com/uploads/default/original/2X/3/32b2302f59fb1454d2fb633649bdbd6e7d3629e2.png)

---

<div class="post-metadata">

**Author:** ![sksuvarn](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@sksuvarn](https://forum.knime.com/u/sksuvarn)\
**Post date:** [July 31, 2018, 7:23pm UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/4 "2018-07-31T19:23:44Z")

</div>

I tried using a File Reader in my earlier posted workfow. Now I have a new Error. How can I resolve this.

![image](https://forum-cdn.knime.com/uploads/default/original/2X/f/f71c6f107db349423e9272f88fca6f55ae9a61d2.png)

![image](https://forum-cdn.knime.com/uploads/default/original/2X/5/5c14311c6ff251560417e688b9fc58a0d71bc8f1.png)

Thank you,  
Sid

---

<div class="post-metadata">

**Author:** ![ipazin](https://forum-cdn.knime.com/user_avatar/forum.knime.com/ipazin/32/806_2.png) [@ipazin](https://forum.knime.com/u/ipazin)\
**Post date:** [August 1, 2018, 6:46am UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/5 "2018-08-01T06:46:33Z")

</div>

Hi Sid,

It is Excel limitation I think. Check this topic:

> [@XLS Writer - Maximum length of cell contents](https://forum.knime.com/t/xls-writer-maximum-length-of-cell-contents/10736):
>
> Hi all, i`m trying to export data into a xlsx file, however some of the cells reach the maximum length of some 32 000 characters. Is there anyway to still export the file and simply cut the cell content at the limit or split the cell into two cells ? best And

Br,  
Ivan

---

<div class="post-metadata">

**Author:** ![sksuvarn](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@sksuvarn](https://forum.knime.com/u/sksuvarn)\
**Post date:** [August 1, 2018, 8:02pm UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/6 "2018-08-01T20:02:30Z")

</div>

Thank you Ivan,

I was able to read multiple excel files from a folder and export out as a master excel file. However, I only see the data from 1 tab got consolidated. My input files contains 3 different tabs ( A, B & C). Is there a way I can export all of that data consolidated into my master in the same format as my input ( with tabs A, B & C )

~Sid.

---

<div class="post-metadata">

**Author:** ![izaychik63](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/i/e9a140/32.png) [@izaychik63](https://forum.knime.com/u/izaychik63)\
**Post date:** [August 1, 2018, 11:29pm UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/7 "2018-08-01T23:29:10Z")

</div>

Use 3 loops by tabs and look on Excel Sheet Appender.

> **[Excel Sheet Appender (XLS) — NodePit](https://nodepit.com/node/org.knime.ext.poi2.node.write2.XLSAppenderNodeFactory)**
>
> Appends a data table to an existing workbook.

---

<div class="post-metadata">

**Author:** ![ipazin](https://forum-cdn.knime.com/user_avatar/forum.knime.com/ipazin/32/806_2.png) [@ipazin](https://forum.knime.com/u/ipazin)\
**Post date:** [August 2, 2018, 7:51am UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/8 "2018-08-02T07:51:36Z")

</div>

Hi!

Yes you can. As @izaychik63 said you need to loop over tabs and use Excel Sheet Appender.

Br,  
Ivan

---

<div class="post-metadata">

**Author:** ![sksuvarn](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@sksuvarn](https://forum.knime.com/u/sksuvarn)\
**Post date:** [August 7, 2018, 8:31pm UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/9 "2018-08-07T20:31:18Z")

</div>

Thanks @izaychik63 & @ipazin.

I played with the loop over tabs things a bit and ended up here. How can I join the 3 loop ends to Append ?

Is this what loops by tabs mean ? Thanks for your help

 ![image](https://forum-cdn.knime.com/uploads/default/original/2X/f/f874b292b1f354db3d1b7ca9adf19273c014af66.png)

Thank you,  
~Sid

---

<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:** [August 13, 2018, 12:02pm UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/10 "2018-08-13T12:02:46Z")

</div>

If you already know that the collection of Excel Files all have sheets A, B, C there is no need to again read the sheets and loop over them. I would just loop across the Excel files themselves and have three flows that import the data. The regular Loop End node would Append the results. If you have changing structures you might have to modify the approach.

 ![image](https://forum-cdn.knime.com/uploads/default/original/2X/0/09e216f36e5e016fb8b5db2c967d5e5c58b1e320.png)

[kn\_example\_excel\_abc\_sheets.knar](https://forum-cdn.knime.com/uploads/default/original/2X/9/92b60cbb30bdfd712bd6f7bd0048002bc7accbaf.knar) (109.1 KB)

---

<div class="post-metadata">

**Author:** ![sksuvarn](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@sksuvarn](https://forum.knime.com/u/sksuvarn)\
**Post date:** [August 15, 2018, 2:48am UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/11 "2018-08-15T02:48:42Z")

</div>

Thanks a lot Mlauber71. That really helped.

---

<div class="post-metadata">

**Author:** ![swatityagi](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@swatityagi](https://forum.knime.com/u/swatityagi)\
**Post date:** [January 22, 2019, 11:25am UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/12 "2019-01-22T11:25:20Z")

</div>

How can we import multiple excel files in KNIME at one go?

---

<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:** [January 22, 2019, 5:00pm UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/13 "2019-01-22T17:00:57Z")

</div>

Maybe you could adapt this workflow

> [@How to read multiple excel files in a folder and multiple sheets in an excel file?](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-a-folder-and-multiple-sheets-in-an-excel-file/10723/9):
>
> Yes that is also possible. You can just tell the loop end to accept all kinds of Columns and data. You will then have to sort them out later. I have added a function where you store the source of you data since that might play a role. The whole structure then is somewhat messy. [kn\_example\_multiple\_excel\_sheets2.knar](https://forum-cdn.knime.com/uploads/default/original/2X/c/cda286884e2d6bfcb0f472572cb99aad594eb003.knar) (106.3 KB)

---

<div class="post-metadata">

**Author:** ![swatityagi](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@swatityagi](https://forum.knime.com/u/swatityagi)\
**Post date:** [January 23, 2019, 7:47am UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/14 "2019-01-23T07:47:46Z")

</div>

I tried this earlier also but it didn’t work, I’ll again explain my task, I’ve some files in my pc(they can be of any format excel or csv) and I need to import them into knime environment at one go instead of using Excel Reader(XLS) node again and again. I’m attaching 3 files here, please help me with the workflow that I can use. For the reference I’m taking example of 3 files but there can be hundred files since I’m very new to KNIME and wants to explore this as much I can.[Data1.xlsx](https://forum-cdn.knime.com/uploads/default/original/2X/8/8712accea2e633093240c1123f3d86f366c71393.xlsx) (15.3 KB)  
[Data2.xlsx](https://forum-cdn.knime.com/uploads/default/original/2X/e/e6dc640c0e2f07300462dcdd82d66caaa4c63f82.xlsx) (16.1 KB)  
[Data3.xlsx](https://forum-cdn.knime.com/uploads/default/original/2X/0/04c8e885d131b02b9f606e38166fe23890621a56.xlsx) (15.8 KB)

---

<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:** [January 23, 2019, 9:59am UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/15 "2019-01-23T09:59:48Z")

</div>

You could take a look at this workflow. Not sure if there is a way to load Excel files in one step without loop. Only technique I could think of is an external Hive table referring to a folder of CSV files (have not yet tried that with KNIME) but that seems not to work with KNIME.

And another note. There seem to be some customer informations and names in the sheets. Maybe you want to check if you are 100% comfortable with sharing them.

 ![image](https://forum-cdn.knime.com/uploads/default/original/2X/2/2c2dea56bea161a0040c4ba78874d93bed7c4e92.png)

[kn\_example\_multiple\_excel\_sheets4.knar](https://forum-cdn.knime.com/uploads/default/original/2X/5/5d7d9aa44d787ec3396794b8a6f16e04bec51994.knar) (136.3 KB)

---

<div class="post-metadata">

**Author:** ![swatityagi](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@swatityagi](https://forum.knime.com/u/swatityagi)\
**Post date:** [January 24, 2019, 6:02am UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/16 "2019-01-24T06:02:33Z")

</div>

Hi, how can we apply fuzzy in knime as the same fuzzy that we apply in SQL, like if I want to check the similarity between name or address or telephone numbers.

For eg: We have address column in two different files(one is employee\_master and second is vendor\_master) and I want to check the similarity % between these columns(in any)

---

<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:** [January 24, 2019, 6:51am UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/17 "2019-01-24T06:51:12Z")

</div>

First I think it would be best if you have a new question to open a new topic, makes it easier for people to find relevant information.

Then as has been mentioned [here](https://forum.knime.com/t/calculate-the-similarity-of-two-value-string/9939/2) there seems to be just the workflow you need to compare Adresses. Maybe you could adapt that:

> **[Deduplicate Address Data for Happier Customers | KNIME](https://www.knime.com/blog/address-deduplication/)**
>
> Deduplication is the process of identifying redundant records in a data set referring to the same real-world entity and subsequently merging these together. This article talks about how to avoid address deduplication.

[https://www.knime.com/knime-applications/address-deduplication](https://www.knime.com/knime-applications/address-deduplication)

Also if you just want to calculate the similarity of strings there is this thread:

> [@Comparing Strings](https://forum.knime.com/t/comparing-strings/12939):
>
> Hello, I’m having problems doing something which I hope is quite simple. Ideally I would like to solve this without the need for any scripting. I’ve split a string up into a list of all the words that make that string (max 10). I then want to compare this list of words with those of another string using. I can do this in Excel easily - the first comparison yields a score of 2 and the second comparison yields a score of 3. In this instance I would choose the second comparison over the first one…

---

<div class="post-metadata">

**Author:** ![swatityagi](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/958977/32.png) [@swatityagi](https://forum.knime.com/u/swatityagi)\
**Post date:** [January 28, 2019, 7:36am UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/18 "2019-01-28T07:36:43Z")

</div>

Hi, I,m trying to import multiple excel files in knime using one workflow but getting error in one of the node, ii would be great if anyone can help me about the thing that I’m missing here.  
I’ll attach all the files that I want to import along-with the picture of the workflow with the error.

 ![Capture](https://forum-cdn.knime.com/uploads/default/original/2X/7/7918c194429c9387add4f02848e07cbb9740dfcd.png)

---

<div class="post-metadata">

**Author:** ![ipazin](https://forum-cdn.knime.com/user_avatar/forum.knime.com/ipazin/32/806_2.png) [@ipazin](https://forum.knime.com/u/ipazin)\
**Post date:** [January 28, 2019, 10:20am UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/19 "2019-01-28T10:20:16Z")

</div>

Hi there!

What error are you getting? Do you manage te read at least one Excel file or you get error in first iteration?

Br,  
Ivan

---

<div class="post-metadata">

**Author:** ![pawanmtm](https://forum-cdn.knime.com/user_avatar/forum.knime.com/pawanmtm/32/6411_2.png) [@pawanmtm](https://forum.knime.com/u/pawanmtm)\
**Post date:** [January 29, 2019, 12:06pm UTC](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775/20 "2019-01-29T12:06:48Z")

</div>

Hi Swatityagi,

can you try uncheck the first row header option while configuring the node.

Regards,  
Pavan.

[Next page](https://forum.knime.com/t/how-to-read-multiple-excel-files-in-one-folder/9775.md?page=2)
