Alteryx Designer Desktop Discussions

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

Multiple Sheets from Excel - Uploading and Merging

Yeonsujen
7 - Meteor

Hi All,

I need some help with uploading and merging multiple Excel sheets to Alteryx.

I have the attached "Example_MultipleSheets.xlsx" file and created the following workflow:

Yeonsujen_1-1636722407129.png

 

For the input files, I manually upload each one and select the different sheets from the Excel file. There are sometimes "Notes" and "Hidden Files" sheets that are not needed. Also, each sheet needed has a different number of rows I need to pull from so I need to manually adjust each "Select Records" tool. I then get the attached "Output File.xlsx".

Even though this workflow works, it looks quite messy and it can be very tedious when I have an Excel file with 20+ tabs and need to manually upload them and select records for each one like above. Is there a better, efficient way of doing this?

Thanks in advance!

5 REPLIES 5
messi007
15 - Aurora
15 - Aurora

@Yeonsujen,

 

You can do it using a batch macro :

 

messi007_0-1636723543211.png

 

Below the macro

 

messi007_1-1636723569876.png

 

Attached the zipped workflow.

 

Hope this helps,

Regards,

Yeonsujen
7 - Meteor

Hi @messi007, thank you for your solution!

I apologise in advance since I'm still a beginner and have never used a batch macro. I have some questions below:

Is there a way I can select individual sheets from the "List of Sheet of Names"?

Yeonsujen_0-1636725955183.png

For example, I don't want to load the "Notes", "Hidden 1" and "Hidden 2" sheets.

Also from the output, there are a number of rows that are not needed. As mentioned above, each sheet required has a different number of rows I need to pull from. Is there a way I can remove all rows where the "Assignee Last Name" are all [Null]?
Yeonsujen_1-1636726060531.png

 

Finally, do I need to have "Reader.yxmc" saved anywhere in the same workflow? I'm not fully aware of how this works, sorry!

messi007
15 - Aurora
15 - Aurora

@Yeonsujen,

 

I added a comment on the workflow to answer your questions.

 

messi007_0-1636740307472.png

 

You have to save the workflow and the macro in the same folder.

 

Best regards,

Yeonsujen
7 - Meteor

@messi007 Thank you for answering my questions in the workflow! Super helpful to know which formulas/tools to use, much appreciated 🙂

Yeonsujen
7 - Meteor

Hi @messi007,

Sorry, it's me again! I am trying to use your workflow and macro for a different file. I have changed the file on the "Reader.yxmc" macro and used the first sheet as a sample (just like in your original macro for the "Amy Green" sheet):

Yeonsujen_2-1637081072422.png

 

However, now when I run this on the "ReadSheets.yxmd" workflow, it doesn't pull all the data from the different Excel sheets and only repeats from the first Excel sheet in the macro file:

Yeonsujen_1-1637080968372.png

I'm not sure what the issue is, could you please help me?

Labels