Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Setting up UI element for Excel

(0) ShareShare
ReportReport
Posted on by 9

Hi there, I am currently working on a flow where I will open multiple excel and amending columns in there, however the excel comes in protected view. I am trying to use UI Element to click my way to make the sheet "unprotected". The issue I am facing is that the UI Element does not work on the excel file it opens. I took the elements from a new Excel sheet, hence it is Book2. I tried editing the element to look for "CurrentItem" as the name of the Excel book but it is still not able to work. The error is "Failed to get window".

 

Any assistance is appreciated.

 

Screenshot 2023-11-02 105936.pngScreenshot 2023-11-02 110009.pngScreenshot 2023-11-02 111741.png

  • Verified answer
    NathanAlvares24 Profile Picture
    1,673 Super User 2025 Season 1 on at
    Re: Setting up UI element for Excel

    Hi @MosesL !

     

    You can try out the following flow:

    NathanAlvares24_2-1698909737926.png

    NathanAlvares24_3-1698909769721.png

    So here I set the excel instance to be maximized and focused in the foreground. Instead of "Click UI element in Window" action, use the "Send mouse click" action. Since the "Review" tab, "Protect/Unprotect Sheet" button and the pop ups are fixed.

    Error handling set to continue flow and "Go to next action".

     

    This works fine on my end. Please do let me know if any error still persists. Hope this helps.

     

    Regards,

    Nathan Alvares

    ----------------------------------------------------------------------------------------------------------------------------------------

    If this helps & solves your problem, please remember to give a "Thumbs up" and "Accept my solution" as it will help others in the future.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow