web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to Deal with Error...
Power Automate
Answered

How to Deal with Error Handling when Launching Excel and file is not found

(0) ShareShare
ReportReport
Posted on by 114

I have a very simple PAD flow that launches excel, opens an xls file and then saves it as xlsx.  This works, but I want to address the scenario where the file is not found.  There are a number of different ways that I could handle this, but they all come down to the same problem, which is that everything comes to a grinding halt when Excel gives you a popup box acknowledging that the file cannot be found.  You have to click okay to move to the next step in the flow (even on block error), but these boxes only appear when the flow is running.  When I stop the flow, they go away, so I cannot use any of the UI automation actions to look for the box.  I've tried generating the popup boxes in other ways, but they aren't the same.  I have also tried using On Block Error, as well as On error in the Launch Excel action.  No error handling moves forward until the okay box is clicked during the flow and the box is gone when I stop the flow.  I can't figure out how to work that into the automation.  Thanks in advance.error 1.png

I have the same question (0)
  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    If file exists %FilePath%\%FileName%

        Launch Excel

    End If

     

    This way, it will never try to launch if it doesn't exist.

  • FreeRangeDingo Profile Picture
    114 on at

    I was not familiar with the If file exists action.  Thanks very much.  Accepting as solution.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 253 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 172 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 134 Super User 2026 Season 2

Last 30 days Overall leaderboard