Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Output multiple files with multiple sheets based on columns

pratap19
6 - Meteoroid

Hi experts,

 

I am looking for a help.

 

I am doing one project and struct with the below issue.

 

The Data: 

 

Grouping ComplexLocationPay Scale GroupPay Scale LevelRateIncrease AmtIncrease PercentNew Rate
Van Buren PlantLocation ABG010116.040.460.02867816.50
Van Buren PlantLocation ABG013516.140.460.02850116.60
Van Buren PlantLocation BBG010116.240.460.02832516.70
Van Buren PlantLocation BBG013516.850.460.02832516.70
East Texas LiveLocation DBG010115.90.50.03144716.40
East Texas LiveLocation EBG013516.10.50.03105616.60
East Texas LiveLocation FBG014016.20.50.03086416.70

 

The requirement:

The flow needs to create multiple workbooks based on column "Grouping Complex" and each such work book should contain multiple sheets based on column "Location".

In this case for example, there will be 2 workbooks.

1) Van Buren Plant   -   contains 2 sheets

                                     1. Location A - 2 records

                                     2. Location B - 2 records

2) East Texas Live   -   contains 3 sheets

                                      1. Location D - 1 record

                                      2. Location E - 1 record

                                      3. Location F - 1 record

 

PFA data file. Thanks in advance.

7 REPLIES 7
Felipe_Ribeir0
16 - Nebula

Hi @pratap19 

 

Please see the attached workflow. The secret here is to build a output filename with the formula and take this filename to use as location on the output tool. With this logic you will be able to specify exactly which excel file/sheet name each record must be written.

Felipe_Ribeir0_0-1663841086419.png

Felipe_Ribeir0_1-1663841165454.png

 

 

Felipe_Ribeir0_2-1663841187066.png

 

If the provided answer helped you to solve the problem/was correct, please accept it as a solution :)

 

Thanks.

Emmanuel_G
13 - Pulsar

@pratap19 

 

Find attached the way of doing that.

 

Please do not hesitate to mark this answer as solution if it worked.

 

Emmanuel_G_0-1663842907119.png

 

pratap19
6 - Meteoroid

Hi,

 

I am getting below error while running the flow.

 

pratap19_0-1663850448686.png

Could you  please help me with this?

Felipe_Ribeir0
16 - Nebula

Hi @pratap19 

 

1)You must see if the path that the formula tool is building is making sense. It must be always like that: FolderPath\Filename.xlsx|||SheetName.

2)You must see if the configuration of the output tool is correct.

 

Take a look again at my or @Emmanuel_G workflow, once you get the idea it will be easy to replicate :).

 

pratap19
6 - Meteoroid

Hi Felipe,

 

Thanks for your help. I am able to update the path and create the output. But I found out that output files are not in excel format. PFB screenshot.

 

pratap19_0-1664176708233.png

 

Output tool configuration:

pratap19_1-1664176749339.png

 Please help me on this.

 

Thanks,

Pratap

Emmanuel_G
13 - Pulsar

@pratap19 

 

Did you put the extension .xlsx and specify the sheet after the ||| in the Output field which will be used as the file path in the output tool?

pratap19
6 - Meteoroid

Its resolved finally. Thank you

Labels