I have a workflow that writes output to an Excel file. Every day, it appends a new worksheet with a dynamic sheetname (today's date -1 business day (unless there's a bank holiday involved)). I need to be able to then use this most recent worksheet as input when I run the workflow on the next business day. So I need to dynamically input the most recent file (which I know how to do) and the most recent worksheet (this is where I'm stuck). Especially since I can't really just apply a formula that says "hey grab the worksheet with yesterday's date" since the date might not actually be yesterday. Any suggestions?
Hi @KateC
Can I know which country's bank holiday you are considering, so that I can input the same as a separate input and link to the existing workflow.
Shanker V
I'm using USA bank holidays
Hi @KateC
After selecting the most recent file, you can use the dynamic input tool or the batch input macro to get all sheet names inside of that file
After that, you can build some logic to filter just the most recent sheet (it depends of the pattern of names of the sheets).
The attached example do something similar using the batch macro instead of the dynamic input tool.
and to get the most recent file - you can use a directory tool - sort descending on creation time, and then sample 1. This will give you the most recent file (presumably yesterday). - you can then feed this file in via a batch macro.