combine 2 rows to one cell without groupby and aggregation

I have a situation where i just need to merge a column in 2 rows to single cell, but the rest of columns should remain same Its like excel merge and center. I just need them to be merged, don’t need to be centered.

What is your end goal?

This isn’t Excel, where these kinds of tricks are employed to make spreadsheets human-readable.

KNIME is about machine-readability. Each row needs to be a standalone record, and so you can’t merge KNIME table cells in this way.

1 Like

I have to create an output report to share with client in this format

How many duplicate Plan Number/IDs can you have and are they always contiguous?

You could try to first remove every second entry from the first column (set it empty eg by testing rowindex with modulo or sth) and then write to excel template. Maybe it picks up the value if you have merged cells. Just a guess have not tried it myself
(Who in the world has actually invented merged cells and for what reason beside annoying developers?)


I have many rows and they are sorted, so its always continuous

Thank you, will try it

Hi @chaithuj , I have a component that may give you similar to what you want. It doesn’t merge cells, but it will blank repeated cells for readability, which may be of use if you are then writing to Excel. It’s a bit like “fill down” in reverse :wink:



1 Like

Hello @chaithuj
As @elsamuel commented base KNIME data tables cannot handle custom cell merges.

Have you explore the possibility of customize your output table, by coding it to HTML? There are some workarounds aiming to achieve the requested result in a view node.


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