Start Free Trial

Alteryx Designer Desktop Discussions

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

Formatting output for Excel

DKMI
7 - Meteor

I am concatonating fields within Alteryx (I need one row per record for the purposes of a downstream mail merge) so my output looks a bit like this:

 

'Elephant, Monkey, Shrew'

 

When I output to Excel it reads, correctly, 'Elephant, Monkey, Shrew' in a single cell.

 

As I am using this in a mail merge, I want it to show as:

 

Elephant

Monkey

Shrew

 

In a single cell (ie, the same effect I would get if typing it in excel pressing alt+enter after each word), as this will allow me to simply put the field into word and have it formatted as a list.

 

Is there a way in Alteryx I can output in this format to an excel cell whilst maintaining a single row?

2 REPLIES 2
ChrisTX
16 - Nebula
16 - Nebula

@DKMI in the attached workflow, the formula

 

Replace([F2], ", ", "
")

 

has a newline specified as the replacement character.   A trick I've seen a few people use.

 

But in Excel it will display as:

F1F2
My single rowElephantMonkeyShrew

 

Until you set the cell or column to "Wrap Text".

 

Then it will display as:

F1F2
My single rowElephant
Monkey
Shrew

 

You could use a Run Command tool to call a Powershell script, to set Wrap Text within the Excel file.

 

Here's a related Idea, if you'd care to add a Like: 

Enhance options for Excel output

https://community.alteryx.com/t5/Alteryx-Designer-Ideas/Enhance-options-for-Excel-output/idi-p/84326...

 

Chris

davidskaife
14 - Magnetar

Hi @DKMI 

 

I found a very old post on the community with a similar problem, so here are two options for you:

 

You have the fields in separate columns prior to concatenating - a very simple formula that places a carriage return after each field

DavidSkaife_0-1679569107609.png

While the output in Excel looks wrong, when you click into the cell its displayed correctly

DavidSkaife_1-1679569152235.png

 

The second option is if you already have the fields concatenated:

DavidSkaife_2-1679569184352.png

Again the output looks wrong in Excel, but is right when you click in the cell:

DavidSkaife_3-1679569218264.png

 

Hope this works for you!

 

I've attached the workflow for you to look at

Labels
Top Solution Authors