Hi Team
I have a file that is in xls format.. And whose table name or sheet name changes everyday
How do I use the dynamic input tool to input the file from a directory
I seem to get errors when doing so.
Please do send a simple workflow with a template you used - it would be really helpful
Thank you
Solved! Go to Solution.
Hi @clarrock ,
The solution that will take the newest file from a particular folder will work for you?
If yes please check this link for a sample workflow:
Hi @clarrock
xls is a old version(97–2003) of xlsx. Alteryx cant directly read sheet names of xls.
Here is a post where python code is used to read xls sheet names.
Additionally if you can rename extension xls to xlsx it will be more flexible.
Hi @clarrock
Was able to crack it.
Workflow:
Make sure you select the folder with files in the directory tool.
Output:
Hope this helps 🙂
If this post helps you please mark it as solution. And give a like if you dont mind 😀👍
Hi @atcodedog05
This is a good solution
But I'm getting this error - what could be the reason
Please advise
Hi @clarrock
Can you share the complete screenshot which tool is causing this issue.
I can help you based on that.
Hi @clarrock ,
I've written a couple of useful macros for this.
I've attached the example workflow and the tools. The first macro dynamically reads in the sheet names from all .xlsx files (you'll need to change the extension references to .xls but the functionality is the same). These can then be attached to the fullpath field and fed into the second macro to load them in.
You can apply filters to remove the ones you don't want, and you can sort by creation date descending and sampling the first 1 to take the latest (grouping by name if you want the latest one for each filename etc.)
Anyway, I hope this helps.
M.