cancel
Showing results for 
Search instead for 
Did you mean: 

Issue While saving the Excel file in a different Network Drive, "Could not execute code stage because exception thrown by code stage: Save Workbook took more than 30 secs"

nikhiln
Level 5
Hello everyone,


When I am trying to save the File on Network Drive on One of our Production Robot , we are receiving this error
"Could not execute code stage because exception thrown by code stage: Save Workbook took more than 30 secs"

But this does not happen when I am Saving the File on another Robot Locally (one of the Robot's Local Drive is access by another via Network Drive)

Can accessing the Files over Network cause this problem ?

Thanks
Nikhil



------------------------------
Nik
------------------------------
3 REPLIES 3

PabloSarabia
Level 11
Hi Nik!

Here you have two possible options to solve this:

1: Change the timed out for the Close Instance method over the MS Excel VBO.
28348.png
2. The second option is to save the file locally and the moving with file with the "Utility - File Management" Object and the Action "Move File".



Hope this helps you

Bye 🙂

------------------------------
Pablo Sarabia
Programmer
Altamira AM
------------------------------

diane.sanzone
Level 7
Hi Nik,

I completely agree with Pablo's response but just wanted to add an additional option.  I've had this same problem, and my institution doesn't allow us to modify the blue prism object pages directly.  I created an additional page in the object that allows me to send in (and therefore overwrite) the timeout value for the page.  No code changes are needed. Just create a copy of the page, set an input parameter for the timeout value, then rename the code in the code stage on the page. You can't have 2 code stages with the same name in the same object or you'll get a compiler error at object load.  This option allows you to only increase the timeout value for the pages where you need it, rather than changing it for all your processes that use the save function in excel.

Hope this helps!

------------------------------
Diane Sanzone
------------------------------

martin_reuter
Level 4
Hi Nik,
I once had the same problem when I tried to save a workbook with massive formula calculations. I have added another page in the Excel VBO by copying "Trigger Calculation Event", renamed the code stage to "Calculate and Wait" and inserted the following code:
excel = ws.Application (below ws where we get the worksheet pointer)
and instead of ws.calculate:
Do
    excel.Calculate
Loop While Not (excel.CalculationState = 0)

May be it is an option for you to switch calculation mode to manual anyway. - I have optimized my process further with a replacement of formulas by values after I have the results I need.

------------------------------
Martin Reuter
------------------------------