Alteryx Designer Desktop Discussions

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

Encounter error when iterate rows to generate specific excel files.

Crazycc
5 - Atom

Hello,

 

I've encountered a problem where I can't iterate through and output a specified Excel report.

 

The requirements are as follows:

 

1, Read mapping.xlsx, as shown:

 

            未命名图片.png

 

   

 

2, The data in the table corresponds to specific paths, A.xlsx, B.xlsx, C.xlsx, D.xlsx, as shown:

 

 

                          未命名图片.png

 

 

                         

                        未命名图片.png

 

                       未命名图片.png

 

 

 

3, I need to iterate through the rows of the mapping data, open each path specified in a row, then union all the data and generate a single Excel file. For example, based on the data in mapping.xlsx, we should generate 312.xlsx and 131.xlsx, as shown:

 

                    未命名图片.png

 

                   未命名图片.png

     

 

4, Currently, both the 312.xlsx and 131.xlsx files that I've generated output the same content which is wrong, as shown:

 

                   未命名图片.png

 

Any ideas how to solve this one?

 

Thank you!!!

3 REPLIES 3
jrgo
14 - Magnetar

Your 2 "Action" tools are not configured correctly. You need to SELECT the attribute you want it to update.

 

How you currently have it configured:

image.png

 

Should be configured like this:

image.png

Crazycc
5 - Atom

Really thanks for your rely, i tried to fix it like you said, but still not working.

Pang_Hee_Choy
12 - Quasar

the key issue is assigned random number before all data merged.

batch macro mean each line will run once. so 2 line mean run twice, hence each run got 2 different identify.

 

hence, i changed the macro to load files only. 

then in the output, only then add the random and fullpath.

 

and duplicate whole set for B. 

Screenshot 2023-09-06 162110.png

 

so it will become:

 

mapping > load all locA files > assign identify > path  > output

               > load all locB files > assign identify > path  > output

Screenshot 2023-09-06 162114.png

Labels