Alteryx designer Discussions

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

How to output multiple tabs within a single Excel file based on a field name

Highlighted
Asteroid

I am needing to output segments of a table to separate tabs within one Excel file.

 

Here is an example of the table where I need the data to output to a separate tab based on the Tab Name field.

 

Vehicle#StateTab Name
CCAB9CA327
CCAG3CA319
CCAG3CA319
JCEA1CA324
JCEA4TX335
JCEA5CA318
JPFA9CA320

 

I have attempted to do this with the following configuration, but am receiving an error to specify sheet name. I have specified a sheet name of Sheet1.

 

sonseeahray_0-1577825716515.png

sonseeahray_1-1577825738953.png

sonseeahray_2-1577825786988.png

sonseeahray_3-1577825864535.png

Highlighted
Comet

One way to do this is to select "Change Entire File Path" and define that using your path and tab names, like the attached.  Will that work?

 

Tab Name Question.PNG

 

 

Highlighted
Alteryx
Alteryx

Can you show the entire configuration box? Or even better, attach a copy of the yxmd file? If you don't have a sheet name in the initial file specification, you could get that error even if you are replacing the sheet name. 

 

The attached workflow does save the data in separate tabs. Just as a test, I temporarily removed "|||Sheet1" from the file name and did get the error you described.

Highlighted
Asteroid

Hi EW and TonyA,

 

I'm sorry I am just seeing your responses...

 

Here is a screenshot of the entire configuration box. As you suggested EW I selected "Change Entire File Path" and still received the same error message.

 

sonseeahray_0-1577973339039.png

Highlighted
Alteryx
Alteryx

Try using a formula tool to create the paths for each file to be created. For example: 'C:\Users\erica.chuong\Desktop\' +  tostring([Tab Name]) + '.xlsx|||Sheet1'

 

See attached for an example workflow. 

Highlighted
Asteroid

Thank echuong1. I'll be able to use that in the future. I'm attempting to create a separate tab within the same file.

Highlighted
Comet

Hey @sonseeahray - try using the formula tool to create a full path with the filename and tab name, like 

 

"H:\Alteryx Test Output.xlsx|||"+tostring([Tab Name])

 

Tab Name Question3.PNG

 

(or changing Tab Name to a string first as in my original solution) 

and using that as the Field Containing Filename or Part of Filename with Change Entire File Path.  It looks like you're just using the Tab Name in your screenshot.  

 

Tab Name Question2.PNG

Highlighted
Asteroid

Thank you @EW! That works perfectly!!

Labels