Delete excel file not working

Hi I need your help As I mentioned in screen shot I am saving pdf file and close file and class 1 activity I created custom activity for send a mail and after this I am try to delete this excel file but when I try to delete this excel file I am getting error and I already check my excel file not open anywhere

Hi @Aditya10989,

Maybe the first thing you should do is to move your delete outside the Excel Scope. I’m guessing it’s there because your Write Range (the excel type) is inside the same Do.

You can also put delete in a looped try/catch or some other loop that indicates when the file is available.



@tmays Thanks for reply but did not understand…!!

you were using write range activity that would be using the excel at the background
and you can mention the kill process with process name as “EXCEL”
and that would close the excel by placing before delete file activity…

and then place both the kill process and Delete outside the excel scope application buddy @Aditya10989


i hope you have already used the kill process, just need some small changes buddy
as you were almost done…

Kindly try this and let know buddy
Cheers @Aditya10989


It looks to me like you have Delete inside the Excel Scope so the file is still open. Move Delete outside the scope. Before worrying about looping around the delete

If the file is still locked, you can use the invoke method here to try to release it. Just ignore that it’s talking about mail attachments.



1 Like

thank you very much…!!


1 Like

Thats great buddy
Cheers @Aditya10989