ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

Alteryx Designer Discussions

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

Dynamic Databases creation

5 - Atom

I would like to create a workflow where i read multiple excel files and then create one table for each file and write it to a database.


Schema of each file could be different


Can someone provide a sample workflow for the same having 3 or more different excel files

8 - Asteroid

I've written several similar answers in other threads.  Are your Sheet Names in the files variable or something constant like "Sheet1"?


Assuming your sheet names are constant (or at least predictable, like the sheet name is the same as the file name) then the below sample should be what you need.


This scenario is perfect for a Batch Macro.  The Control Parameter will be used to drive selection of a single source Excel file / sheet.  The sample below is a workflow that gets file names from a directory, then calls a macro to take action on each file.


The macro will handle the activities you'd perform against a single file like writing it to a separate database table.  The macro will be called by a parent workflow that passes in the list of files to take action on.  In my sample macro I've got a placeholder Container with a dummy Filter tool that you'd replace with any actual logic needed on the data in a given file.


Simple parent workflow to gather file names and pass into batch macro:




Sample Batch macro to process 1 file at a time: