Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

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

sonseeahray
8 - 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

8 REPLIES 8
EW
11 - Bolide

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

 

 

TonyA
Alteryx Alumni (Retired)

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.

sonseeahray
8 - 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

echuong1
Alteryx Alumni (Retired)

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. 

sonseeahray
8 - 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.

EW
11 - Bolide

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

sonseeahray
8 - Asteroid

Thank you @EW! That works perfectly!!

mrbillyjackson
7 - Meteor

Trying to do this writing to SharePoint. It writes the first sheet, so my connection is fine. But gives me the Error Win32 Error 1175 for my other two sheets. I'm using a Formula Tool to pass the sheet name to my 3 output tools.

mrbillyjackson_2-1626897054157.png

 

mrbillyjackson_0-1626896945892.png

 

mrbillyjackson_1-1626896965555.png

 

Labels