Free Trial

Alteryx Designer Desktop Discussions

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

How to dynamically read Excel based on date?

nadiahnoorlin
5 - Atom

Is there anyone who can help me with how to read files from yesterday's date when running the workflow on today's date?

 

For example:

 

The file's date on 22th of April, but the workflow runs on the 23th of April. Means on 23th of April workflow will find files on 22th of April?

2 REPLIES 2
AngelosPachis
16 - Nebula

Hi @nadiahnoorlin ,

 

You can use a Directory tool that will point to a certain path in your system and look for files of a particular type. 

 

Once you run the workflow, that tool will return to you a list of all the files in that directory. One of the available columns would be [Creation Time] and if the file was created yesterday you can implement a logic that would dynamically keep only records that have been created yesterday.

 

If the file date is also contained in the name, then you can parse the [Filename] column to extract the date and then similarly to above, implement a logic with a filter tool to only keep records that have been created yesterday.

 

Finally, if your different files have the same schema, you can use a dynamic input tool to read all of them in Designer. Otherwise, you would have to create a batch macro.

 

Hope that helps,

 

Angelos

messi007
15 - Aurora
15 - Aurora

@nadiahnoorlin,

 

Please see below how you can do it:

 

messi007_0-1619160674126.png

Attached the workflow,

 

Hope this helps!

Regards

Labels
Top Solution Authors