Excel Processes not closing after Close Workbook activity

Since 2 weeks ago, i started to have a problems with the Excel Applications scope activity.

After the process is made inside the excel file, and the Excel Application Scope ends, some times the excel process stays opened and the Robot stop running and keep waiting forever for something to happen, it doesnt’s neither crash nor stop responding, just stays there.
If i open the task manager and close the process, the robot then continues with the rest of the activities until it stops again for the same reason.

I tried to use the Close Workbook activity after the Excel Application Scope,updated the activities, reinstaled the Uipath studio, but nothing seems to have fixed the problem.

I dont know if this is a bug with the current versio or something like that,

I’m currently using Excel 2016 on a Win 10 with UIpath version 2019.9.2
Since it doesn’t crashe, i dont have any crash reports to upload.

Anyone knows what is this issue and how to fix it?

@Victor_Llera

Use Kill Process activity and specify process name as “Excel” to kill excel application. I guess it will work here.

2 Likes

Hey @Victor_Llera

After the processing, add a Save workbook activity in the excel application scope to save the things you did in excel, then right below the excel app scope, place a Kill process activity just like @lakshman has mentioned.

It will make sure that the file is saved and the process is killed so that you also retain your newly processed data…


Excellence is achieved through constant challenging and breaking off from your limitations. It isn’t taught or given; it begins within you. – @Lahiru.Fernando

2 Likes

Hey @Lahiru.Fernando thnks for the fast answer, i tried that but the process still doesn’t close, but at least the process stoped freezing.

I have yet to try it in other processes to see if it works.

press hot key win+r and then type like this
taskkill /f /t /im excel.exe

The problem with task kill is that it closes all workbooks that are oppened, i just want it to close the one that it is using.

Hi
Welcome to UiPath community
–in EXCEL APPLICATION SCOPE activity we got a property named workbook
–from that property get a output variable named out_workbook
–then use a CLOSE WORKBOOK activity atlast inside the scope where mention the out_workbook as input which will close only that workbook

if you are facing this issue then uninstall the excel package and reinstall it
that can be done in Design tab in studio → Manage packages → in dependencies → uninstall excel package → then in official tab search for UiPath.excel.activities and install it

Cheers @Victor_Llera

Hi,

I’m facing this exact same problem, with uipath version 2019.10.2 and uipath.excel.activities 2.7.2. Even with close workbook after the excel scope. I also tried to insert a small delay after the excel scope and before the close workbook. I also tried 3 close workbook activities one after another: no error but no excel closing. Excel closes itself after 30 seconds or more.

1 Like

Try to add “Visible” option and close workbook inside excel application scope.
i also faced similar issue, i just added above options and it work.

hope it work for you @gromeo @Victor_Llera