cancel
Showing results for 
Search instead for 
Did you mean: 

Excel not attaching when running through process

RichardLoughins
Level 4
Hi, I'm having an issue attaching an excel file when running through the process in Process Studio, and would appreciate any advice or help in resolving it. In an ideal world, the process should run a report on a separate system, which when finished, will open an excel file. I want to attach the process to this Excel file, then save it and close it. When I run through the process manually, it does everything it's meant to do and it picks up the excel file, saves it and closes it. However, when I run it, the excel file doesn't get attached and instead it opens a new file and saves that. I've tried using various wait stages after each of the actions but these don't appear to have any impact. I've also tried using the utility object and checking that the process exists first before trying to attach the excel file, but again, this has had no effect. If anyone has any tips or advice on how to ensure the active excel window gets attached, I'd greatly appreciate it. I've been pulling my hair out over this one for the best part of a day and have got nowhere. Thanks, Richard
7 REPLIES 7

Denis__Dennehy
Level 15
This kind of issue - where it works when you ""run through the process manually"" it works, but when you run it at full speed in control room it does not work is almost always due to not having wait stages that wait intelligently for elements/applications you are using to be ready before trying to use them. My prediction is that when ran at full speed your attach is trying to attach before Excel is ready. Maybe add some kind of wait for process window logic (an action in one of the utility objects), or some kind of logic that keeps re-trying to attach for a period of time.

Denis__Dennehy
Level 15
BTW - I see you are using process exists, but that will be waiting for Excel to exist rather than for your workbook to be fully loaded.

RichardLoughins
Level 4
Hi Denis, thanks for the response. Unfortunately I've tried adding several wait stages in addition to the Utility-General Sleep action, but it didn't have any impact. I also tried adding a Window exists stage before attaching it to ensure it was visible before trying to attach the object. I suspect it may have something to do with what application is in the foreground at the time, but I've no idea how I can test this out.

Mary_AnnTanseng
Level 2
Hi, I'm encountering similar issue regarding attaching an existing file of Excel. I have to capture an information on an Excel file that was opened via a website. However, it wasn't capturing most likely because it's not attached. Even when I attempt to retry to attach it, it's still the same issue.

PriyankaTailor
Level 3
I'm having the same problem, I've raised a ticket with Support.

Hi we have the same problem: an SAP report will be exported, which opens a separate Excel. We simply want to close the Excel and therefore need to attach to it. No solution yet found. Did you get a solution from BluePrism support on this? Killing Excel is not really an option since it will then start next time telling you about recovered files. /Bjorn

MetVonghiran1
Level 4
I had the same problem, in my case the cause behind the problem was that there is an EXCEL process remain running in the background although there is no Excel sheet on the screen, (you can check by using command prompt >> tasklist), so when I tried to attach to the newly opened Excel sheet, Blue Prism will always go to the already running EXCEL process instead of the one that is on the screen. The action then go to the new workbook instead of the one that I intended. The way I handle it was after ""Close All Instances"" I will go for check if ""EXCEL"" is running, if it does, ""Kill EXCEL process"". Also when I have to use attach, I will follow with the command ""Active Worksheet"" to make sure that I actually attached to the right workbook, otherwise use exception handling to kill the process and start from open workbook. /Met