Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Importing multiple Excel files using Batch Macro due to rogue anomalies

MRapp
7 - Meteor

Hello everyone,

 

I have Excel files from a vendor portals which generally have the same schema. However, recently the vendor changed the schema in one of the columns, where the "use the input tool with the wildcard" approach doesn't work anymore.

In fact, the the only change to the schema is that one of the V_WString fields has now a size of 320 and no longer 255.

 

Just for this purpose, I have studied batch macros with the Alteryx Interactive Lessons videos and referred to the Ultimate Input Data Flowchart from the Alteryx Community. Unfortunately, the issue remains. I still get the error message running the macro that the one Excel file gets skipped:

Input Data (1) The file "[...]\Automated Alteryx Report\[...].xlsx|||`Sheet0$`" has a different schema than the 1st file in the set and will be skipped

 

Even with setting the Interface Designer to either "Auto Configure by Name" or "Auto Configure by Position", the one odd Excel file with the anomaly in the schema gets singled out.

 

What am I missing?

 

 

 

4 REPLIES 4
binuacs
21 - Polaris

@MRapp Seems to be you are giving the wild card character in the batch macro as well, instead of the * give the full file name of the input file used inside the batch macro

image.png

OTrieger
12 - Quasar

@MRapp 
Can you send a snippet of the action tool to see how it is configured?

When you are using a Batch Macro there is not need to use a wildcard as you can define for it to take the new full path and it will work fine.

Something is not adding up, it cannot be that only the field size was changed, something else was changed. You need to understand what is that change.

One solution will be to open that specific file separately and then join it to the rest of the data.

MRapp
7 - Meteor

@binuacs I have removed the wildcard and selected one specific file of all the files. However, now just running the macro on a canvas it only processes that particular file. Is it save to assume I have to rewrite additional components of my workflow, i.e., using the Directory tool to read all the files, using the Formula tool to add the particular sheet information and then use that as input for the macro?

MRapp
7 - Meteor

I was able to resolve it, thanks to both of you!

 

In short, I had to change a single Input tool into a flow of Directory Tool, Select Tool, Formula Tool, and Batch Macro.image.png

Labels