I am unable to delete an excel file via executing multiple transaction item since i am reading the values from excel to send an email. I am getting an error as “File is being useds by another process”.
Can someone suggest the best way to deal with this?
The excel file must be open in the background while the process is trying to read the data from it.
You can either manually close the file before executing the process or you can close the file programmatically using Kill Process activity in the process before the file reading activity takes place.
Check while attempting to send the email, the file completes and reading and closed properly
If you are unable to find that still then you can use Kill Process activity and write Excel
So before attempting to send the email It will kill the Excel instance and send the email
Please try using Read Range Workbook Activity present in System>File>Workbook>Read range Workbook As this activity doesn’t open the excel application while executing the multiple transaction item.
If you are using excel application scope, please use close workbook activity to close the instance gracefully. You may have to create a variable of the workbook instance and pass the same to the close workbook activity.
Please note the close workbook activity should be called outside the excel application scope.
Also add in a small delay between close and delete activity.