Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Merge/combine cells over existing columns



I have the excel output that stats from row 2(col1,col2,col3,col4).Is it possible to create a new row by merging few fields in alteryx over the existing header row similar to one shown in the pic?





Hi @Newbie_1


If you import an Excel sheet with a merged cell, it will place the value of the merged cell in the first column that it exists in. Whether or not that field was in the Excel file originally, It is not an Alteryx functionality specifically to have a header over two or more columns in Alteryx. That being said, there are ways you can work around this in Alteryx. I have attached a workflow with 3 examples of how this could be done in Alteryx.


1. Use the formula tool to combine columns and rename the column header. This will merge the four columns into two columns with a "|" separator


2. Use the report text tool to format the data the way you would like to see it


3. Alter the table tool xml with the formula tool to change the width of the "location" to 2 columns using "colspan." This example is not supported as it is a custom alteration of the xml, but it is a possible solution to the problem you are facing. The example I have shared only does this alteration for Location 1. 


@JakeS : Thanks for the that.! Unfortunately,im unable to open the workflow that you added. I get this error



Hi @Newbie_1


I made the workflow with 2018.3. I made a change so you should be able to open the workflow now, and I've also added the excel sheet which I have been using as the input. 


@JakeS: I thought it might work, but it doesnt. :-( I the data becomes 1|a and 1|b ,but does not keep 1 and a as seperate colums