Alteryx Designer Desktop Discussions

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

Input multiple Excel files with multiple sheets with same layout but without header

dbuz
7 - Meteor

Hello everyone,

 

I am a newbie with Alteryx and was wondering if you could help me with my problem. I know a lot of questions like this have already been asked, but I couldn't find a thread that meets my needs.

 

I would like to load several sheets from different xlsx files from a directory into Alteryx, but the problem is that the second sheet of each excel file does not have any header, so I would need to copy / paste the header of the first sheet into the second, only if the second sheet present some data inside. Sometimes I work on files that have only one sheet with data, where this process is not required and other times I work on files with multiple sheets and this should only apply to those files.

 

With that done, Alteryx should load all sheets from all files and consolidate all data into one dataset, which I will work on.

 

Any kind of help in this regard will be greatly appreciated.

 

Thanks in advance!

12 REPLIES 12
dbuz
7 - Meteor

@mceleavey,

 

I was wondering if I could bother you one more time. Would you also be able to advise on how to insert a regEx inside the "Import Multiple Schema Flat File" macro which imports all files within a specified folder? I would like Alteryx to only upload files named "File123_dateoftoday" instead of all of them. I am trying to edit the macro, but I have no experience with them so it seems quite complex to me.

 

Thanks one more time!

 

D.

mceleavey
17 - Castor
17 - Castor

You don't need regex, and you don't need to mess with the macro.

After the Directory tool, simply parse out the date from the filename and apply a filter tool where the file date = datetimetoday()

You may need to format the date when you parse it.

 

M



Bulien

dbuz
7 - Meteor

Good call! Will do it right away, thanks! 

Labels