**Overlay Matching Columns from Excel1 into Excel2 dynamically**

:pushpin: Objective

Create a KNIME workflow that:

  • Reads data from two Excel files:
    • Excel1: Source file with ~60 columns (contains data)
    • Excel2: Template with ~5 columns (column names to retain + possibly empty rows)
  • For each column in Excel2:
    • If a column with the same name exists in Excel1 β†’ copy data from Excel1 into that column in Excel2
    • If no matching column in Excel1 β†’ leave the column in Excel2 as-is (blank or default)

:outbox_tray: ➀ The structure of Excel2 must remain exactly the same β€” only data should be filled in where matching columns exist in Excel1.

Hey there,

definitely seems like a doable topics - I suggest that you provide a minimal example of data in excel and I am sure someone can help you out with a prototype.

Cheers,

Martin

2 Likes

Excel2.xlsx (8.9 KB)
Excel 1.xlsx (9.9 KB)
Attached excel for reference

Hi,

have you tried the reference column filter?

3 Likes

Hi @san_98, from what you’ve described, (keeping the structure of Excel2 unchanged) I’m assuming you want to physically write back to Excel2, I would suggest looking at @ActionAndi 's workflow but then adding on a Write To Excel Template node. (This is available in the AF Utilities extension)

I think if you specify the template file as the Excel2 file and specify to write into the template, also configuring where the first writeable row is, it would probably do the job.

2 Likes

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