We're excited to announce that we'll be partnering with Credly starting October 19th - see what this means and read the announcement blog here!

Alteryx Designer Discussions

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

Looping through the excel files with different schema

Sangs
5 - Atom

Dear Alteryx Community,

 

I am trying to loop through a set of excel sheets in a big work flow. 

 

Any idea if it can be achieved by any method other than specifying * in the input file. That does not work as the excel sheet formats are very different.

 

Thanks,

5 REPLIES 5
atcodedog05
20 - Arcturus
Sangs
5 - Atom

Hi,

 

Thanks a lot for your suggestion. I learnt a lot from the link.

 

However, I feel my need is somewhat different. I have a alteryx model that read through multiple sheets of an excel and picks up the necessary data.

I have used many tools like picking the first 8 rows, etc.

 

I am trying to achieve the same for 10 other excel spreadsheets but unfortunately they have slightly different schema. If I try to follow the method mentioned below, all the sheets are read together and the values are combined, instead of executing the alteryx workflow entirely for each excel spreadsheet.

 

Is there a way to solve this? It is more like a loop where alteryx model is expected to execute for each excel. Kindly let me know if we have a solution.

 

Thanks

NicholasM
Alteryx
Alteryx

Hey @Sangs

 

I do believe that we can accomplish what you are trying to get at here. I also think it will follow the same method mentioned in the article posted by @atcodedog05 above. I believe the path you will have to go down is creating a Batch Macro route.This process will look like the following example attached. 

 

In this process you will feed in a list of files and sheet names. Then use the Batch Macro to read in sheet by sheet separately. The beneficial thing about going the batch macro route is you get the ability to configure how the sheets are combined after reading them in. This is down within the interface designer (View -> Interface Designer).

 

NicholasM_0-1626207523540.png

 

Hopefully this points you in the right direction. If you have any questions please ask. 

 

Sangs
5 - Atom

Hi,

 

Thanks for your time. I do not have the version you have used. Can you please save it as 2019.2 if possible and share it again?

NicholasM
Alteryx
Alteryx

Hey @Sangs, If you try to open the .yxzp. This should create a folder that contains the data for the workflow as well as the workflow itself as the .yxmd. To change the version so you can open it simply open the .yxmd in notepad and change the version history at the top from 2021.2 to 2019.2. See photos below. 

 

NicholasM_0-1626268091872.png

NicholasM_1-1626268147425.png

 

 

Labels