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.

Combine multiple excels into one with multiple tabs

selsset97
7 - Meteor

Hi, I am trying to combine multiple excels into one where each excel is included in a different tab.

In addition, I need each tab to be named as the name of the Excel file

I have +100 Excels. Is there a way to facilitate this exercise?

I have already read previous posts but for some reason I cannot re-do the code.

 

Can anyone integrate these excels in the following form, please?

 

Input (1):

A01.png

 

Input (2):

A11.png

Input (3):

A12.png

 

Output expected:

selsset97_0-1673609054631.png

 

 

Thank you. 

 

14 REPLIES 14
DataNath
17 - Castor

Hey @selsset97, here's a very simple workflow that achieves this using a macro I built a while ago - https://community.alteryx.com/t5/Community-Gallery/Output-to-multiple-Excel-files-or-sheets/ta-p/951...

 

DataNath_0-1673609792792.png

 

Output:

 

DataNath_1-1673609815618.png

 

As the inputs share the same schema, we just bring them all in together using a wildcard in the input. As part of the Input Data configuration, we output the filename which is then used as the sheet name in the final output.

 

The key parts of the aforementioned configuration are here - save the Excels into one directory and use the *.xlsx to bring in every Excel file. Then select 'File Name Only' in option 5:

 

DataNath_0-1673610050683.png

Felipe_Ribeir0
16 - Nebula

Hi @selsset97 

 

Try the attached workflow.

 

Felipe_Ribeir0_0-1673609926003.png

 

 

 

ShankerV
17 - Castor

Hi @selsset97 

 

Please find one way of doing this.

ShankerV_0-1673609966351.png

 

ShankerV_1-1673609983916.png

 

 

Many thanks

Shanker V

 

 

selsset97
7 - Meteor

Hi, thank you for your response. Could you upload the code please?

ShankerV
17 - Castor

Hi @selsset97 

 

Sorry seems some error during uploading.

Hope you are able to see the code now.

 

Many thanks

Shanker V

DataNath
17 - Castor

@selsset97 packaged workflow is attached to my original post which you can download and extract then use :)

selsset97
7 - Meteor

I am trying to replicate the code but this error keeps popping up. Do you know how to fix it please? thank you.

JamesCharnley
13 - Pulsar

@selsset97  there's absolutely no need for a batch macro here because your files all have the same schema. The other two solutions provided should be easier to configure

ShankerV
17 - Castor

Hi @selsset97 

 

Can you check on the below setting on Output tool.

 

ShankerV_1-1673611696337.png

 

Many thanks

Shanker V

Labels