Alteryx Designer Desktop Discussions

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

Split output into multiple Excel files to different folders

YeahMan
8 - Asteroid

Hi Community,

 

I'm trying to split my output into multiple Excel and save to multiple different directories/folders based on fields in my data. My data looks like:

 

YeahMan_0-1607961627755.png

 

I would like each Program to be its own Excel file AND I would like to save the output to a folder that matches the School. So all the data related to 'Acting for Film and Television - P0198' would be written to

...\Schools\Media\Programs\Acting for Film and Television - P0198.xlsx.

 

Similarly, 'Culinary Management - P0435' data would be saved to ...\Schools\Food & Wine Sciences\Programs\Culinary Management - P0435.xlsx.

 

The folders for the Schools already exist; I just need to separate the data, give each Excel workbook the appropriate name and dump it in the right place by matching on the School. I've looked at a bunch of the posted solutions, but I am not finding anything that combines the 2 tasks. BTW there are 137 programs so using filters would be a bit daunting.

 

Thanks,

--sue

10 REPLIES 10
JosephSerpis
17 - Castor
17 - Castor

Hi @YeahMan this article shows you how to tackle this and has an example workflow. Esentially you are going to need build the filepath using a formula tool and the fields you identified. Then using the Output Data Tool configuration options to use/change the filepath with a field should output the data in the right folders and be separated correctly.

messi007
15 - Aurora
15 - Aurora

@YeahMan,

 

Please see below:

 

messi007_0-1607963074490.png

you have to create the path for every type and then use it in the output like above.

 

Attached the workflow,

Regards

YeahMan
8 - Asteroid

Thanks @messi007! This did the trick and is a simple solution. 

 

I went one step further and created a new column:

 

"C:\Temp\Schools\" + [School] + "\Programs\" + [Program]+".xlsx|||DATA"

 

then used it in the "Field Containing File Name or Part of the File Name" parameter. It avoids a long, nasty IF statement as I have 13 different Schools :).

 

Thanks again,

--sue

messi007
15 - Aurora
15 - Aurora

@YeahMan,

 

Good, happy to help 🙂

 

Best Regards,

YeahMan
8 - Asteroid

Hi again @messi007 ,

 

Now that you know what I am trying to do, do you have any advice on how to format the output into an Excel table? My only other option would be to open the 137 Excel files and manually insert tables. It doesn't even have to be a table, but something a bit prettier than just a dump of data. I've looked at using an Excel template, but I don't think that would work when there are more than one output file.

messi007
15 - Aurora
15 - Aurora

@YeahMan,

 

You can use an Excel template then inject data on it.

You have to check keep formatting on the Excel output:

 

messi007_0-1607976127835.png

Hope that helps 🙂

 

Regards,

YeahMan
8 - Asteroid

Hmm, this doesn't seem to be working. I've set up a named range in test.xlsx and used the following settings:

YeahMan_0-1607979324468.png

But it is still outputting as a data dump.

 

The other option I've tried is using a table tool and a render tool, which gives me prettier output, but I lose the ability to save it to different folders.

 

Thanks,

--sue

 

YeahMan
8 - Asteroid

Lol, @JosephSerpis  turns out this is what I did after building out from the reply from @messi007 !

--sue

messi007
15 - Aurora
15 - Aurora

@YeahMan,

 

In this case use the basic table in order to do the formatting in Alteryx then Render Tool to generate the output.

Take a look to this link: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Render-tool-as-output-with-multiple-ex... 

 

Best Regards,

Labels