Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Cutting output files in Alteryx

HannahSwain
7 - Meteor

Hi,

 

I have an Alteryx workflow which includes a data set with different countries. Is there a way I can create an output which is an excel document of each different country please?

 

Thank you,

Hannah

5 REPLIES 5
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @HannahSwain,

 

You could use the bottom section of the output tool for this, the checkbox for "take file/table name from field" will allow you to output multiple files (excel included), one for each variation of the field you select. In your case country.

Firstly, choose your output location as you normally would in the output tool (perhaps use a .csv file)

 

image.png

 

Secondly use the checkbox at the bottom, "Take File/Table Name From Field" and select "Prepend Prefix to File/Table Name" in the dropdown and use your country field as the "Field Containing File Name or Part of File Name".

 

image.png

 

For my sample data set (which included three countries) I get three .csv files written out, one for France, Spain and UK separately.

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Regards,

Jonathan

cgoodman3
14 - Magnetar
14 - Magnetar

Hi

 

When you output the data to an excel file, there's an option at the bottom of the configuration pane as below:

 

Capture.PNG

 

This set up would write the results for each Country into a new tab within the same file.

 

If you want to write them out to individual files, before the output tool and add a formula tool with a field called filename, as below. N.B. Make sure you use the three pipe delimiters and a sheet name (e.g. |||Output) otherwise it will produce an error telling you that you are missing a sheet name.

Capture2.PNG 

Then configure the output as follows:

Capture3.PNG

 

That will get you a new Excel workbook produced for each country.

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
HannahSwain
7 - Meteor

Thanks @cgoodman3 this is helpful - I am getting a message to say "You must specfy a sheet name" but I thought I had?

 

Thanks,

Hannah

grazitti_sapna
17 - Castor

Hi @HannahSwain . try this configuration.

 

grazitti_sapna_0-1599737118329.png

 

Sapna Gupta
cgoodman3
14 - Magnetar
14 - Magnetar

Hi @HannahSwain 

 

It's because in the top configuration when you set up the 'dummy' output file when you set it up to output to an Excel file it will ask you to specify the sheet name and I didn't show that part of the screenshot in my post. If you set it up as @grazitti_sapna has put in their screenshot it will work.

 

Thanks

Chris

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
Labels