Alteryx Designer Desktop Discussions

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

Batch Macro Input Multiple Sheets from Excel File with Differing Schema

ractony7
6 - Meteoroid

Hello Community,

 

I have an Excel file with multiple sheets.  I already know how to import all of the sheets when they have the same schema.  My problems is that many of my sheets have different schema. 

 

The column headers are in different order on some of the sheets. 

 

I can not share the excel file because it has personal information in it.  If anyone has any information that might help that would be amazing.  The macro I have will input some of the files, but only those with the right schema.

 

Capture for AYX Community.JPG

4 REPLIES 4
JosephSerpis
17 - Castor
17 - Castor

Hi @ractony7 have a look at the solution from this post it uses two batch macros one to get the sheet names and will deal if they are different schemas and then another batch macro to deal with the data from those sheets and should handle the difference in scheamas as well. It's also worth pointing out to look at the configuration of the Batch macro in the Interface Design - Properties option as this decides the Output mode which affects how it handles different scheamas and data in different postions.

 

Batch_Macro_07042022.PNG

ractony7
6 - Meteoroid

Hey Joseph,

Thank you for pointing me to the right thread.  When I try to import the solution I get the following message.  What am I reading here?  Obviously it is some sort of warning, but what does this mean in english?

CaptureAskWhatThisMeans.JPG

apathetichell
18 - Pollux

That screen is showing you the paths to the files on the original users computer - click the edit button and select the file on your local machine. Basically - ignore it. when you set this up on your own machine and run it - it should overwrite this.

soccertil1108
8 - Asteroid

In this post I address reading multiple files, including if they have differenct schemas. The accompanying video provides details on how to set it up and process your files.

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Macro-for-Reading-Multiple-Files/m-p/9...

 

Labels