Excel Application Scope forget to remove Excel tmp file many times

Hi all
I made a project generating excel files.
This project simply create xlsx file via Excel Application Scope within For Each loop.
But I have an issue.
This project doesn’t remove a few tmp files.
Each run is different result.

Hello @tango,

are you able to open the xlsx file manually with out any issue / popup? This usually happens if excel is not closed properly.


hi @tango

Use dictionary

Dictionary dict=new Dictionary();
dict.GetFiles(“Path of the file”)
if .tmp exist use path exists
use Delete file option

Ashwin S

Thanks @balramrv and @AshwinS2
This file was made from Microsoft Excel 2016 standard template.
And I can open without any issue.
I created a brand new file from blank book and tried again.
It works fine.

Unfortunately the tmp files are left behind again.

I created a brand new file from blank book and tried again.
It works fine.

This is not solution. :cold_sweat:

Hello there,
I thinks its due to abruptly closing and creating new excel file.
give some delay after excel scope application this give sufficient time to save and close first excel and then create second and so on.(uncheck visible property (not sure this makes sense but i feel like :slight_smile: ) )

If issue persist try this.

Hi @ddpadil
I investigated again and found what cause it.
When AutoSave option is checked, tmp is created and sometimes remain.

1 Like

Me and a collegue have a similar issue with word files…

1 Like

Can you please tell me , How did you resolve this issue?

I have a similar issue. When the Excel Application Scope Activity makes a tmp file, the process pauses for some hours without finishing the process.
I added a Close WorkBook Activity in the Excel Application Scope Activity but had same problem. I opened up Excel as new document and saw too many recovery document lists. So, I closed the recovery document. However, I had same problem after spending 24 hours. Could somebody helps me?