Hello Reader,
There is a requirement to add current date to the file name of the output. Attached is the snapshot showing alteryx feeding to multiple sheets in same excel file.
FileName: INVID vs PSGL Check.xlsx
How do I achieve to rename the file name each day with current date without causing issue in the flow?
I have seen multiple cases in community already but could not find the case where user has multiple sheets in same excel file.
Thanks for your help in advance.
Hi @ankush-agrawal , would something like this work for you?
This involves having a text input file where you would need to specify the folder path and file name you'd like to save to.
We can then use the datetimetoday() formula to include today's date dynamically in the full path.
Then for your output tool, in the bottom configuration you would need to take name from the field we created for the full path and select "Change Entire File Path".
Let me know if this is closer to what you're looking for!
Do you mean I apply this solution after generating the output? Taking the output file generated as input again?
For each sheets in the excel or just one Sheet?
Hey @ankush-agrawal it would depend on how your file outputs and data sets are currently being configured at the moment. I mistakenly assumed you were using just 1 tool for output to various sheets but looks like you have multiple and each save to a different sheet?
Could you perhaps share what the dataset looks like as well as some detail around how you are grouping it into sheets?
Hi @ankush-agrawal ,
Hopefully if I understood your requirement properly - could you test out whether this updated macro works?
You would need to replace your output file tools in your workflow with the macro instead.
For each macro you insert, you will need to configure the following to specify the folder to save to, the file name, and the sheet name.
It should save your file with the name 2022-06-23_INDIV vs PSGL.xlsx (for today's date).
If you apply the solution to one output it will only impact the sheet that you are specifying for that particular output.
Hope this helps further, let me know if I can guide with anything else.