How do i put File not found exception for Excel in uipath?


#1

How do i put File not found exception for Excel in uipath?
Even if the file is not in the specified path, It creates one using excel application scope activity.
My requirement is not to create a file, if it does not find the specified file. Instead it should throw the exception message.

How do i achieve this?


#2

Hey @Mallika

You can uncheck the “Create New File” property of the Excel Apllication Scope from the properties panel on the right side of the screen to get the exception!

Hope it helps :slight_smile:

Regards.


#3

otay , so even though there is probably a system.exception file not found , here , using the “path exists” activity , you can set an if statement to throw a business exception if file not found … see the xaml attached

Main.xaml (11.5 KB)


#4

Hi Rishabh,
Thanks for the response, however I do not see the Create New File option in the property pane:


#5

Try reinstalling the excel activities package. Might work!


#6

Great…It worked!!! Thanks a lot man!! Thank you Niket!!