Free Trial

Alteryx Designer Desktop Discussions

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

Import Different schema of xlsx.file and maintain the file name of excel file

SH_94
11 - Bolide

Hi Community,

 

I would like to seek the help on the batch macro to import different schema of xlsx file and maintain the file name of xlsx file at the same time.

 

May i know if anyone of you have the macro that able to perform the above task? As i try to use batch macro previously and it only able to read one file of the folder. After i render the result , i noted that there are multiple of lines which are created for each row of the data.

 

 

Appreciate if someone can guide me on this.

12 REPLIES 12
BenMoss
ACE Emeritus
ACE Emeritus

Hi Jacob, 

 

It would be good if you could share where you have got to so we can perhaps give you some direction, rather than starting from a completely blank canvas.

 

Ben

SH_94
11 - Bolide

Hi @BenMoss ,

 

Kindly find the workflow below for your reference. I not sure why the another file company b and c always not being read in the macro and hence , i included the file below for your reference.

 

 

Thank you.

 

 

ArtApa
Alteryx
Alteryx

Hi @SH_94 - I believe that this articles will answer all your questions: https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/CS-Macro-Dev-Reading-in-Multiple-Fi... 

SH_94
11 - Bolide

Hi @ArtApa ,

 

I had read through this article before but currently my problem is the macro only read one of the file and when i render the result, it produce many duplicate result which i not sure which part that i have done wrong.

 

It would be great if you can help me to look at my workflow at the above post .

 

Thank you.

 

ArtApa
Alteryx
Alteryx

Hi @SH_94 - I fixed the problem with macros. Now the workflow reads all sheets in all xlsx files. You just needed to separate steps. 

 

1) You read all Sheets' names.

2) You read data from all Sheets.

 

Please let me know if it helped. I did not look into the logic behind these steps.

 

SH_94
11 - Bolide

Hi @ArtApa ,

 

Thank you for the prompt response. 

 

May i know how should i clear the error as per screenshot below ?Appreciate if you can guide me on this.

 

 

 

Jacob_66_1-1616659910780.png

 

Many thanks.

 

 

ArtApa
Alteryx
Alteryx

Hi @SH_94 - I packaged the workflow with both macros inside. Just open the macros first and then the workflow. 

SH_94
11 - Bolide

Hi @ArtApa ,

 

I had tried to open the macro first and the workflow after that. However, it still show the error as per screenshot previously.

 

Hence, i manually input these two macro into the workflow but it show as error as per the second screenshot below.

Jacob_66_0-1616660545394.png

 

Jacob_66_1-1616660573098.png

 

May i know how should i fix this error?

 

afv2688
16 - Nebula
16 - Nebula
Labels
Top Solution Authors