Keep Excel Open, do not close, Excel Application Scope

Does anybody have the same issue? UiPath says if you add a variable in the Output for the Excel Application Scope that it will NOT close the excel. But I added the variable DashB and it still closes my excel, what am I doing wrong?see pic below. I tried Visible and it still does not work. Is this a bug?

Yes, I have the same issue. Tried the latest 2.9.3 Excel activities and still have the issue.

What was happening with me is that I was opening two different excels and wanted to keep one open. It seems UiPath does not like that. So since the first excel I just need to extract information and the second excel is the one I want to edit and keep open. On the first one I used the Excel activities under Workbook, they do the work in the background and does not open the excel, and on the second excel I used the Excel activities under Excel, these do require for the excel to be open. This worked for me, hope that helps you.

I learned some important information from UIPath Support. The behavior of “all Excel windows closing” when using an Excel Application Scope is related to the Visible attribute of the activity.

Quoting the info from Support:
“…this is an expected behavior, where-in if the property is set to false, all workbooks are hidden, including the previously opened ones. Hence, from the user’s perspective, it does appear like his workbooks are suddenly closed, but that is not what happens, thus you see the exe still running in the task bar. Hence for scenarios where you would need to work on Excel sheets while the Robot is executing, we would recommend that you set the visible flag to true.”

So what this means is that if you uncheck Visible, all other open Excel windows are “cut off at the knees” (my words). You will still see Excel.exe in Task Manager/Details, but there is no way for you to get back to the window. After killing the .exe, the Excel file you had open may come up in recovered files (depending on a lot of things).

I guess this means that you can only use Visible unchecked if you know there will not be other Excel windows open (for example, in an Unattended automation). I hope UIPath decides to improve the functionality of the Visible attribute, but for now, I am fixing all my automations that run Attended to check the Visible attribute. With Visible checked, the behavior of Excel Application Scope matches the documentation.

1 Like