cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Close Instance Issue

TruptiKorade
Level 2
Hi Team,

I am using MS Excel VBO and getting below error message on close instance stage
Close Instance    Code    ERROR: Internal : Could not execute code stage because exception thrown by code stage: Close Instance took more than 30 secs.

Could you please suggest what could be the reason

------------------------------
Trupti Korade
------------------------------
5 REPLIES 5

ewilson
Staff
Staff
@TruptiKorade,

There have been a few posts about this in the past. As I recall, it can related to closing a really big Excel sheet that's taking a while to write to disk (i.e. save). Especially in cases where the system is already taxed with other processes consuming CPU/RAM.

Is this happening on your local machine while running in debug, or is this on a runtime resource?

Cheers,​

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Hi @TruptiKorade

Have you tried extending the timeout period on the close instance action? I have several processes where the files are very large and take a while to close so I have the close instance set to a longer wait time to allow them to close without error. You can do this in the close instance action as the timeout period is a data item, no messing around the code. Just open the excel vbo>close instance action and then open the Timeout data item and increase the value to​ the desired period. (See screenshot below). Hope this helps :)

25662.png

------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------

Hi,

Of course, if the Save or Save As action already worked without problems, you could just ignore the Close Instance crashing and just kill the XL process. This obviously only works, if you only have one XL open at the time.

------------------------------
Happy coding!
---------------
Paul
Sweden
------------------------------
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)

We are following approach given by ​Michael ONeil . This is common issues for bulky excel.

------------------------------
Neeraj Kumar
Technical Architect
------------------------------

Mjadhav
Level 3
Hi Trupti, 

You can try MS Excel VBO- Exit action to close all the instances of running excel, I find this is very stable and it is the first choice when it comes to close excel.

Thanks
Mayur

------------------------------
Mayur Jadhav
Softeware Engineer
Accenture
Asia/Kolkata
------------------------------