Showing results for 
Search instead for 
Did you mean: 

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

Multiple Excel Files to One Excel File with Multiple Worksheets

Created on

Multiple files can easily be combined into a single Excel file containing multiple worksheets (or tabs).  The format of the files do not need to be the same; they can be completely different. 


In the example attached to this article, two files, a Customer .csv file and a Store .xlsx file, are output to a single Excel spreadsheet (.xlsx format) with one tab for Customer and another for Store. These files contain different data elements and have different layouts. 


The first step is to create a new field in each dataset (e.g.: 'TabName') and set the expression to the name you want each worksheet to have. In the attached example, 'TabName' is set to 'Customer' and 'Store,' respectively for each dataset. 


When you get ready to output your data, use an output tool for each dataset and configure them in the same way.  The file format is 'Microsoft Excel (*.xlsx)' and when prompted to select a worksheet for the output, select 'Sheet1'. Check the 'Take File/Table Name' checkbox located at the bottom of the configuration window. Select 'Change File/Table Name' in the dropdown and under 'Field Containing Name or Part of File Name' enter 'TabName'.  You probably don't want TabName in your final output, so uncheck the 'Keep Field in Output' checkbox. 



Do you know if there is a way to order the tabs in the output file?  I've tried adding .01, .02.... before my tabs names in the formula, but it still seems to be placing them in the order the operations are being run.  I also have a block until done before each output tab, if that effects it.