# Excel data imported to KNIME that consists of stacked tables with multiple headers throughout

**URL:** <https://forum.knime.com/t/excel-data-imported-to-knime-that-consists-of-stacked-tables-with-multiple-headers-throughout/78174>\
**Category:** KNIME Analytics Platform\
**Created:** [March 28, 2024, 8:02pm UTC](https://forum.knime.com/t/excel-data-imported-to-knime-that-consists-of-stacked-tables-with-multiple-headers-throughout/78174 "2024-03-28T20:02:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cameron767](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/c/3bc359/32.png) [@cameron767](https://forum.knime.com/u/cameron767)\
**Post date:** [March 28, 2024, 8:02pm UTC](https://forum.knime.com/t/excel-data-imported-to-knime-that-consists-of-stacked-tables-with-multiple-headers-throughout/78174/1 "2024-03-28T20:02:45Z")

</div>

My data is being imported to knime via an excel reader and the issue I am experiencing is with transforming the imported data into a knime friendly format with one row as headers and data following. The current format has labels and column headers from rows 0-4 then data following. At about row 22 the same labels and column headers are once again listed (for a different client this time) and this takes up another four rows with new data following. The excel sheet is basically stacked tables, each with their own headers. How can I transform this so that the workflow can recognize when one of these 4 row dividers has been reached, take necessary actions in formatting, then repeat the process? The lengths of the data will vary so I cannot hardcode certain row numbers to be removed; however, the columns will always be the same from table to table. Thanks

---

<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:** [March 28, 2024, 10:23pm UTC](https://forum.knime.com/t/excel-data-imported-to-knime-that-consists-of-stacked-tables-with-multiple-headers-throughout/78174/2 "2024-03-28T22:23:51Z")

</div>

@cameron767 welcome to the knime forum. You can take a look at this example, you identify the start of your tables and mark them as blocks and then import them in a loop

> [@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…

---

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [March 29, 2024, 2:06pm UTC](https://forum.knime.com/t/excel-data-imported-to-knime-that-consists-of-stacked-tables-with-multiple-headers-throughout/78174/3 "2024-03-29T14:06:40Z")

</div>

Hi @cameron767 , if you are using KNIME 5.x, the Table Splitter node could be your friend here too.

> **[Table Splitter](https://hub.knime.com/knime/extensions/org.knime.features.base/latest/org.knime.base.node.preproc.table.splitter.TableSplitterNodeFactory)**
>
> The Table Splitter splits the input table at the row that matches a given condition. The part of the table that occurred before the matching row is forwarded t…

To turn one data table into multiple tables, chain multiple Table Splitter nodes with each being provided the conditions (such as the column headings to look for)

---

<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:** [June 27, 2024, 2:07pm UTC](https://forum.knime.com/t/excel-data-imported-to-knime-that-consists-of-stacked-tables-with-multiple-headers-throughout/78174/4 "2024-06-27T14:07:06Z")

</div>

Closed on June 27, 2024, 2:07pm UTC

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