How to keep EXCEL open even end of workflow

I need to keep an excel file open after the excel application scope. Have searched on the forum and some suggestions,

  1. Add messagebox out of application scope, but it will close workbook at the end of workflow
  2. By using open activities i.s.o. application scope. But this can’t employ the merit of EXCEL activities like range, cells.
  3. Re-open after application scope. This seems not nature to do that.
    Can anyone has better idea to keep EXCEL remain?
    THX a lot.
1 Like

Hey @Eagle_Fan,

Happy to welcome you here.

Yes, I hope I understood your scenario.

PFA for ref - ExcelOpen.zip (36.0 KB)

This may help you.

Feel free to post for anything else.

Cheers :slight_smile:

1 Like

Just so that people reading this thread can quickly know what the suggested answer was from @Nithinkrishna

Step 1. Use Start Process activity and provide the full path to your .xlsx file. This ensures that your .xlsx file is opened with the default application in this case .xlsx opens in excel. But if you have a .pdf file then the default PDF reader you use will open the .pdf file.

Step 2. Using Excel Application Scope you can then read the .xlsx file opened previously in Step 1. This works because UiPath Excel Application Scope checks if the same file is already opened before, if yes, then it uses the instance which is already opened.

Same is true when you use this technique to other file types .pdf, .docx etc. Remember that, in all cases of this solution the opened process will not close unless a kill process activity or another soft way of closing the application / file is used.

4 Likes

Thanks a lot to both Jeevith and Nithinkrishna. I’ll try and reply the test results.

Thanks a lot to both Jeevith and Nithinkrishna. But I encountered some issues,
Step 1. Use Start Process activity It opened EXCEL successfully but pop out error " Application can’t be opened". I solved it by putting FileName as “\off16\excel.exe” and Argument as “”" ABC.xlsx"“” by triple-quot. Don’t know why and I got the solution from some threads in the forum
Step 2. Using Excel Application Scope It will open another instance and set it as read-only file even though I unchecked CreateNewFile in the application scope property.
Thanks in advance for further help.

1 Like

Hey @Eagle_Fan,

Kindly un-check visible property from scope.

Thanks :slight_smile:

Thanks to Nithinkrishna it really helps.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.