Excel 流程作用域会打开一个新的Excel实例?


这是我目前设置的“Excel 流程作用域”活动的属性,它执行后会打开一个excel文档。当原先已有一个excel文档(不一定是目标文档)处于打开状态时,它执行并打开目标文档后不会生成另一个新的excel进程。在这之后再手动打开别的excel文档,也不会出现新进程(如下图)。

如果它执行前没有已打开的excel文档,在执行完成并打开目标文档后(此时有第一个excel进程),再手动打开其他excel文档,会出现两个进程。如下图。
请问,应如何设置,使其始终只有一个excel进程?
我问这个问题是因为:Application.CopyCutMode的值只能在同一个excel实例中传递,当有多个excel进程时不能正确传递值。

@Li_Eric

May I know why excels are being opened manually?

Sorry I could not read the images ..but did you choose reuse if exists?

Because the excel process scope options would work for files opened with UiPath process but would not ideally effect the files opened manually

Cheers

Thank you for your reply.
Yes, I chose “reuse if exist”. Sometimes I need to open another excel file after executing the automation, and use VBA to copy some content between both files. Currently, I have to close the file opened by UiPath then reopen it manually. Is there a solution to let the excel files opened by UiPath or manually use one process?

I also encountered an Excel scope activity. After starting the robot and operating Excel, when the robot tries to download the Excel document again, it prompts that there is no permission to download. Only after ending the Excel process in the task manager can the download proceed. How can I close the process after executing the previous Excel file?

Hi @421292267

Can you try the workaround mentioned in below steps?

  1. Use condition(for example if condition activity ) to check if you get there is no permission to download.

  2. If you get any such prompt, then in the “Then” statement use kill process or close application. if you use close application then in the selector editor pass this code "
    wnd app = ‘excel.exe’
    <[use above here]/>

  3. In that same “then” statement, use the activity/process to download the Excel document.

I hope these steps will help you.
Let me know the result.

Good day