We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Combine multiple tab with different column

SH_94
11 - Bolide

Hi community,

 

I have excel file that have a lot of sheet/tab with different name of the column for each sheet as per attached file. May i know if there is anyway to combine the list of sheet together using macro as i quite new to the macro?

 Tab A

SH_94_0-1671375475632.png

 

Tab B

SH_94_1-1671375520100.png

 

 

Many thanks in advance

8 REPLIES 8
ShankerV
17 - Castor

Hi @SH_94 

 

Please use the input tool to read only  the sheet names.

Then read all the sheet names separately to so that you can avoid macro and do in 2 tools.

 

ShankerV_0-1671375653684.png

 

ShankerV_1-1671375752914.png

 

 

 

If you believe your problem has been resolved. Please mark helpful answers as a solution so that future users with the same problem can find them more easily!!!!

 

Many thanks

Shanker V

SH_94
11 - Bolide

Hi @ShankerV ,

 

Thank you for the prompt response.

 

Currently i at this stage as per screenshot below. May i know how to proceed after the input data tool as the result is show as per screenshot below 

SH_94_0-1671376115537.png

 

Result window view

 

SH_94_1-1671376155353.png

 

Thank you

 

 

ShankerV
17 - Castor

@SH_94 

 

I am trying to build a solution however struck with the logic to combine the sheets.

 

As all 3 sheets has different columns (schema), could you please let me know how you like to combine.

 

Please share the expected output.

 

ShankerV_1-1671376359820.png

 

 

ShankerV_0-1671376347288.png

 

Many thanks

Shanker V

ShankerV
17 - Castor

@SH_94 

 

Use the Formula tool to replace the Sheet Names in the Filename.

Want to replace with A, B, C.

 

ShankerV_0-1671376475625.png

 

Formula tool:

ShankerV_1-1671376492833.png

 

Output:

ShankerV_2-1671376541044.png

 

Now you need to read the sheets based on your requirement how to combine the sheets as you might have a business logic how to combine the sheets.

 

If you believe your problem has been resolved. Please mark helpful answers as a solution so that future users with the same problem can find them more easily!!!!

 

Many thanks

Shanker V

 

 

 

ShankerV
17 - Castor

Hi @SH_94 

 

Finally use the Dynamic input tool to read the sheets in the same excel sheet based on the business logic to combine the sheets with different schema.

 

ShankerV_0-1671376749315.png

 

Many thanks

Shanker V

SH_94
11 - Bolide

Hi @ShankerV ,

 

Currently i am planning to have output as below '

Expected output 1 ( combine all the details together disregard the different of schema in the format below)

SH_94_0-1671376697605.png

 

Expected Output 2 ( combine in the format below )

 

SH_94_1-1671376755427.png

 

Is it double for both output?

 

Thanks in advance

 

ShankerV
17 - Castor

Hi @SH_94 

 

Please find the expected output.

 

ShankerV_0-1671380068905.pngShankerV_1-1671380094892.png

 

Note: The workflow used to achieve the solution is attached which can be downloaded to see how the solution works.

 

If you believe your problem has been resolved. Please mark helpful answers as a solution so that future users with the same problem can find them more easily!!!!

 

Many thanks

Shanker V

 

ShankerV
17 - Castor

Hi @SH_94 

 

As you are new to macro, explaining how to make use of my solution in your system.

 

Download both the files attached, 

1. Combine multiple tab with different column (Alteryx workflow)

2. Community help (Macro)

 

In the alteryx workflow, in the Input tool change your file location of SAP file stored.

ShankerV_0-1671380377668.png

 

Then Run the workflow, to get the desired output.

ShankerV_1-1671380409079.png

 

If you believe your problem has been resolved. Please mark helpful answers as a solution so that future users with the same problem can find them more easily!!!!

 

Many thanks

Shanker V

 

Labels
Top Solution Authors