Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

How to handled dynamic Document name in "Attach to running Excel"

Hi Guys,

I am using "Attach to running Excel" action to navigate through running excel instance,

but the document name is dynamic(Output.xls, Output(1).xls, Output(2).xls....).

Please help me into this how to handle dynamic document name.

Super User
Super User

I have something similar. First, change Output.xlsx  to Output(0).xlsx; you can do that with Rename File.


Next, run your process through a loop to do whatever you need. The loop should start at 0, increment by 1. In the file name of attach to Excel, replace the number with %LoopIndex%.


For dynamic windows UI elements, after you have captured an Excel UI, edit the selectors, go to Name, change to “contains” and change the text to just “Output”; therefore, all the UI connectors will work for any workbook with the title containing Output.  

Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,205)