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.

Outputting a series of Summarize functions into Excel (one tab = One Summarize)

datausernyc0419
7 - Meteor

I am running about 10 different Summarize functions and ideally want to output all of these into one Excel file. For example, each Summarize function would be found in one tab (i.e., 10 Summarize functions = 10 tabs in one excel file).

 

Is this possible? Thanks in advance! 

8 REPLIES 8
JamesCharnley
13 - Pulsar

Hi @datausernyc0419 

 

You can use the Change Table Name option of an output tool to output different groups to different tabs in an excel file. It'll automatically change the sheet name of the file path to create a new tab. In my example, there are 10 different groups that you can see get output to ten tabs. You would just need to have a column containing these groupings.

 

image.pngimage.png

 

If your tables after your summarize functions have different schema, you'll still be able to output to different sheets within the same tab by creating a file path field to use in an output, but create different sheet names after the ||| to indicate a different sheet. Something like the following:

 

image.png

rzdodson
12 - Quasar

@datausernyc0419 definitely possible. What you'll want to likely do is drop a Formula tool following each of your summarize tools in order to dynamically build your desired file path.

 

Solution.png

 

I personally like to use the Engine.WorkflowDirectory variable so I can save my outputs in the same folder as where the original workflow was saved.

 

Hope this helps!

datausernyc0419
7 - Meteor

Thanks for the response. What if I have 4 different Summarize tools here. For example, I have 4 different Summarize functions I am running and then I want to output each of these as a tab into One Excel file?

 

 

rzdodson
12 - Quasar

If each of those Summarize tools are doing unique functions,  and you want to store those outputs separately, you'll add a Formula tool after each Summarize tool so you can create your workbook's tabs.

datausernyc0419
7 - Meteor

Yes, each Summarize tool is doing a different function. So I have 4 distinct icons that I cant just all link to one Output file (only lets you link one). Any idea on what the formula would look like to create one for each workbook tab? Any example workflow would be great. Sorry for the trouble. 

JamesCharnley
13 - Pulsar

@datausernyc0419 

 

The principle remains the same no matter the number of summarize tools, but if you need to output them separately then you might need some extra orchestration to allow each tab to be output correctly, such as the use of control containers or a batch macro. For example if Alteryx starts trying to output the second tab while the first one is still being written, then you'll get an error.

rzdodson
12 - Quasar

@datausernyc0419 : in the solution I provided earlier in this thread, you can find this example:

 

Solution1.png

In your workflow, you'll have a Summarize/Formula tool combination that outputs your specific calculations to its respective tab. James and I's Output tool examples will show you both how to dynamically change the path of your Output tool so it can take in the results of its associated data stream.

nagakavyasri
12 - Quasar

@datausernyc0419 Attached sample workflow to write to multiple tabs of same sheet.

 

You may want to turn OFF AMP Engine or use Block until done to avoid errors.

 

 
 

Capture.PNG

Labels