Concatenating two columns from two different files..



I am trying to concatenate two different columns from two XLS files but unfortunately not yet succeed though tried different nodes (Joiner, Cell Replacer and concatenate). Following is the example of what I am looking for


XLS 1 -----> XLS 2 ------------------> RESULTS

ABC             DEF --------------------> ABCDEF
......             .......                            .............

It should not be that difficult but I couldn't find an easy way to solve the problem thus writing here, will appreciate your help.


Best Regards,



Seems you're after a row-by-row concatenation, so I'd join them on RowIDs (if necessary create them from scratch), and then concatenate via Javasnippet:


return $XLS1col$ + $XLS2col$;


The rest is mere clean-up.




Why not joining both tables by row ID and then make use of the Column Combiner node?

In case the rows do not have anything commong the join by row index can be performed (since 2.8) using Column Append. The rest can be done with String Manipulator or many other nodes.

Cheers, gabor

It's just that I dislike column combiner for its insistence re quote characters and column separators - "clean" concats don't want either. I think it's possible to avoid both kinds of nuisance characters even with the column combiner node, but somehow I never remember how (GUI not awfully intuitive).


- E

Thank you all for your quick reply. I fixed the problem :).. However, column A has one value which has to be joined with different values of column B, Is there an automated way to do that too ? i.e.

Col A -----------------> Col B

ABC ...........................DEF




Thanks in advance,






did you try to configure the Column Combiner just with empty "Strings" for Delimiter and Replace Delimiter by?





I think that's the way it worked, yes. But you will agree that it's super-unintuitive: combine columns using a (non-existent) delimiter and replace this delimiter (what's that supposed to mean, anyhow?) with an arbitrary character. WTF? :D


If I want to split my combination product afterwards I'll take the collection anyhow, so why bother with delimiters? What was the intended use case? Important for some ChemInformatics, maybe? You see I take this "Ergonomist" name serious, which is why I love KNIME for its (usually/mostly) intuitive GUI. :-))


-- E



If you're looking for a cross-join, that's something I've been looking for repeatedly as well, and with forum help I found it's easy: my standard practice is now to add to both tables a column named "joinme" containing identical letters or numbers (math formula node or java snippet node). Then join the tables on the two respective "joinme" columns, and you're all set.




The attached R Snippet (2:1) template would allow you to do this with a single node.  It also checks that your tables are the same length.  May be useful if you expect to do this often.

Dear All,

I had a similar problem but found that the "Column aggregator" node comines to column in a simple and clean way with or without delimiter (whatever is needed).


Hi Stefan,

the thread is three years old and I guess at this time we didn't had the column aggregator node :-)

Cheers, Iris