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?
@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:
F1 | F2 |
My single row | ElephantMonkeyShrew |
Until you set the cell or column to "Wrap Text".
Then it will display as:
F1 | F2 |
My single row | Elephant 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
Chris
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
While the output in Excel looks wrong, when you click into the cell its displayed correctly
The second option is if you already have the fields concatenated:
Again the output looks wrong in Excel, but is right when you click in the cell:
Hope this works for you!
I've attached the workflow for you to look at