cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FreeRangeDingo
Helper I
Helper I

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

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

1 ACCEPTED SOLUTION

Accepted Solutions
MichaelAnnis
Super User
Super User

If file exists %FilePath%\%FileName%

    Launch Excel

End If

 

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

View solution in original post

2 REPLIES 2
MichaelAnnis
Super User
Super User

If file exists %FilePath%\%FileName%

    Launch Excel

End If

 

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

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

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Top Solution Authors
Users online (4,252)