Hello friend,
i would really appreciated if you could help me with this problem.
I want to program a series of instructions to be made for several excel files saved inside a network.
I want my bot to go through all differents excel files. So that, my robot must acces to those excel files. Sometimes those excel files are opened for other users and for that reason not available to be used for my robot.
The problem i want to resolve is:
I want my robot to skip error if a Excel file that is supossed to be used is not available (because is already opened , etc)and continue with the other excel file in line to be used.
We would maybe have to use Try Catch Activity to handle or skip the errors on Each Excel file that you are trying to use.
Another Option would be to maybe configure Existing Processes Action property of the Excel Process Scope activity as Force Kill so that the Excel task would be killed and the automation should be able to continue.
I assume u have the list of excel filepaths in a array variable named arroffiles
Now use a FOR EACH activity and pass array variable as input and change the type argument as string
Or
Better use for each file in a folder activity
Inside the loop use a TRY CATCH activity and keep USE EXCEL file inside the try block and have all the reading activities
If something goes wrong the exception will be caught in CATCH Block where use a KILL PROCESS activity with Processname property as “Excel”
This will ensure that though excel fails it continues with next file without any issue
Step 1: Loop Through Excel Files Using For Each Loop
Step 2: Put try catch block into IT
Step 3: In try block put your Excel activities
Step 4: In catch block catch the error & also add continue statement so that it will continue with the loop.
Hello @Palaniyappan
thanks for helping.
Actually i neither write a list with the email’s paths nor i used Try catch…
But i will follow your suggestions .
i never used Try catch before but i will tried during weekend to built the program as you suggest…
Thanks a lot