# Unpivot the Excel file collectively

**URL:** <https://forum.knime.com/t/unpivot-the-excel-file-collectively/76688>\
**Category:** KNIME Extensions\
**Tags:** text-processing\
**Created:** [January 21, 2024, 6:36am UTC](https://forum.knime.com/t/unpivot-the-excel-file-collectively/76688 "2024-01-21T06:36:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex1368](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/f0a364/32.png) [@alex1368](https://forum.knime.com/u/alex1368)\
**Post date:** [January 21, 2024, 6:36am UTC](https://forum.knime.com/t/unpivot-the-excel-file-collectively/76688/1 "2024-01-21T06:36:17Z")

</div>

Hello  
I have a folder that contains a large number of Excel files, and the Excel files are in such a way that they cannot be consolidated normally, and they must be UNPIVIT first and then consolidated.  
But I don’t know how to do it and there are too many files and I can’t convert manually please help me  
The sample file and the output file in my opinion are as follows

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/d/3/d3ab62aa2fe0af5024a96542552168976465ff5c.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:** [January 21, 2024, 9:24am UTC](https://forum.knime.com/t/unpivot-the-excel-file-collectively/76688/2 "2024-01-21T09:24:26Z")

</div>

@alex1368 you might have to identify the blocks of the tables and import them separately (in a loop) and then unpivot them:

> [@Move head rows to a column](https://forum.knime.com/t/move-head-rows-to-a-column/45094/2):
>
> @willy_oracle typically you would mark all lines with a [Counter](https://kni.me/n/pVT_aAQrO1Jkt9cG). Then identify the ‘headers’ with a rule engine [IF Col1 LIKE “Head\*” =\> Counter] and keep that (starting) row in a separate column. Then you [fill the missings with the previous value](https://forum.knime.com/t/replace-placeholder-with-values-from-above/38602/4) so a block would emerge marking the data table: [image] So now you have the blocks marked an can use a [Table Row to Variable Loop Start – KNIME Community Hub](https://kni.me/n/q7loejCZ1HWH5hUr) or [Group Loop Start – KNIME Community Hub](https://kni.me/n/7a8fxq51Z1jrgXeM) to do something with the blocks (export them delet…

You will have to know which pattern(s) would match your files. This will involve some planning

Do you have any idea if they might be formatted/marked as excel tables.

---

<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:** [April 20, 2024, 9:24am UTC](https://forum.knime.com/t/unpivot-the-excel-file-collectively/76688/3 "2024-04-20T09:24:33Z")

</div>

Closed on April 20, 2024, 9:24am UTC

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