Excel Application Scope reopens already opened file

I’m automating executing a macro which opens some excel files and updates its contents (not yet saved). After the macro process, the robot needs to do some checking on the data in those files before saving so I’m using the Excel Application Scope activity and set its ExistingWorkbook property to the file opened. The problem is that, the file is reopened when executing the activity and so the changes are gone. Any idea how to stop this reopening from happening?

I’m thinking of just back up the file before the update > save the changes made by the macro > file is reopened by app scope activity > check the file, and return to the backed up file if the check turns out not good and file should not be saved, but I want to avoid this extra process as much as possible.

Thank you in advance!

1 Like

Fine
Either uncheck the VISIBLE property in the property panel of excel application scope
Or
Use Kill process activity and in the property panel mention as “EXCEL” in the property ProcessName

Hope this would help you
Cheers @kaydine.santuyo

Thank you for the response.
Unfortunately unchecking the Visible property does not work and the file still reopens.
And I don’t quite get why the kill process suggestion?

As you say it’s opening the already opened file right
To avoid that if we close the already opened one before the new one gets opened we won’t face this issue I guess
Cheers @kaydine.santuyo

I need the file to not reopen because there are changes in the file that I still need to check before saving.
But thank you for the reply!

1 Like