Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Input columns from multiples sheets

VMR
7 - Meteor

Hi - I am just trying to figure out the tool that helps me to pick specific columns from multiple sheets from 1 excel file and give me 1 output file consolidating that specific column. ex: A file contains sheet A, B & C have many columns. Those few columns have customer ID and Customer name but in different positions. I have to find a way to select ID and name from all three sheets and consolidate and provide one output. It is difficult for me as the sheets are not in the same format. Any help is appreciated, thanks!

 

Added example file and output sheet to see the expected output.

8 REPLIES 8
afv2688
16 - Nebula
16 - Nebula

Hello @VMR ,

 

Could you share with us an example file with some mock data? Just to have an idea about the whole problem.

 

Regards

VMR
7 - Meteor

Hi - added one example file. 3 sheet and one expected output sheet.

rakshabhat
7 - Meteor

Hi @VMR,

 

Normally this would work well if you had the same schema for all the worksheets you use. 

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/How-To-Import-Multiple-Excel-Sheets...

 

Since you dont, I would suggest you to take a look at the workflow I did. It gets you the output you desire, but it involves you selecting each worksheet one by one. 

 

Hope that helps. 

 

Thanks,

Raksha

VMR
7 - Meteor

Hi @  rakshabhat

afv2688
16 - Nebula
16 - Nebula

Hello @VMR ,

 

I have prepared a macro that merges all the sheets together.

 

Untitled.png

 

Regards

afv2688
16 - Nebula
16 - Nebula

I'm adding also this just in case you want to merge more than 1 file (on the same path).

 

Regards

VMR
7 - Meteor

Thanks, ACEAFV2688 - 

 

This could help a lot. Can you give me a short video of creating this macro to help is my other works too. Thanks in advance!

afv2688
16 - Nebula
16 - Nebula

Hello @VMR ,

 

Rather than a video I prefer to explain it here.

 

  1. The macro reads the list of sheet names for each file.
  2. Using regex I replace the <List of sheet names> parameter with the actual sheet
  3. With the help of a batch macro, I replace the templates for the dynamic input and the file location to read it.
  4. A select tool is placed then on the end to get the columns needed.
  5. The formula tool within the macro adds the sheet name.
  6. After the process, data is then merged together (like in an union) using the names for it (should the names be different then it would not have worked). To configure this parameter you need to acces the interface designer (Cntl + Shift + d)

 

Hope this helps

 

Regards

 

Labels