Alteryx Designer Desktop Discussions

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

.xlsx import for specific dates

anovohatski1
7 - Meteor

Good afternoon,

 

Hopefully someone has a crafty solution or alternative for my need. I would like to pull the latest available excel file (only available on business days) and a file for each available month end (last business day of each month). What's the best way to achieve this?

 

Example:

2020-08-11.xslx

2020-08-10.xlsx

2020-08-07.xlsx

....

2020-07-31.xlsx

...

2020-06-30.xlsx

 

 

4 REPLIES 4
echuong1
Alteryx Alumni (Retired)

This can be achieved relatively easily using the dynamic input tool.

 

Essentially, you'd import a list of all files in the folder. From there, you can actually sort and filter for the most recent file. The dynamic input tool will then use the file path to load the proper file. 

 

See this article for more information and an example:

https://community.alteryx.com/t5/Alteryx-Designer/How-to-dynamically-run-the-most-recent-file-in-a-f...

anovohatski1
7 - Meteor

@echuong1 Thank you for recommendation. I tried this method, but unfortunately it didn't work given that some files have a different number of columns and therefore get skipped. Is there something else that I need to do to get it to work?

echuong1
Alteryx Alumni (Retired)

Yes, you will have to build a batch macro to import the data rather than the dynamic input. The beginning process will look the same when selecting the file path of the most recent file, but the dynamic input will be replaced with the macro.

 

See this article for information on creating the batch macro:

https://community.alteryx.com/t5/Alteryx-Designer/CS-Macro-Dev-Reading-in-Multiple-Files-with-Differ...

anovohatski1
7 - Meteor

Hi @echuong1 , thank you for your help!

Labels