cancel
Showing results for 
Search instead for 
Did you mean: 

Error internal save workbook as

VratHimbo
Level 6
Hi all, 
I've the following error when i try to launch bot from control room
ERROR: Internal : Could not execute code stage because exception thrown by code stage: SaveAs method of Workbook class failed
If i run it from debugger no error appear. 
The path is composed by environmentVar &datetime&".xlsx"
Why this occur? 
Thanks in advance

------------------------------
Vrat Himbo
------------------------------
12 REPLIES 12

KrishnaA
Staff
Staff
Hello Vrat Himbo,

If you have not already tried,  suggest testing the process with hardcoded path and file name just to rule out that file path and name aren't the cause of this error.

Best regards,

------------------------------
Krishna A
Blue Prism
------------------------------
Krishna A [CompanyName]

Hi @KrishnaA,
thanks for reply, i've just tried with hardcoded file path and still the same.
The destination folder exist, the file path is as follows:
EnvironmentVarPath&Datetime&"Report "&FormatDateTime(Now() + MakeTimeSpan(0,1,0,0) ,"dd-MM-yy hh-mm-ss" )"&".xlsx"
What is the possible issue?
Another question: why if i debug a project in case of exception it stop the execution instead if i run from control room keep going?
Thanks

------------------------------
Vrat Himbo
------------------------------

Hi Vrat Himbo,

With regards to your second query, it is the expected behavior.  Remember executing from the Control Room is an unattended execution.  When executed from the Control Room, the process marks a particular work item as an exception if an error occurs and moves to the next record.   This is by design.

Is the expression getting evaluated properly?  There is an option to test the value of the expression in the expression builder window.   Test and see if the value you are getting is a valid file path and name in Windows.

Hope this helps.

Best regards,

------------------------------
Krishna A
Blue Prism
------------------------------
Krishna A [CompanyName]

yes @KrishnaA, the expression is valid and if i run from debugger it generate the report in the correct folder.
I've tried to save to desktop folder and not in shared folder, via control room appear error "Microsoft excel cannot access the file" and i put for testing the hardcoded path&test.xlsx, the same, if i try via debugger no error appear and generate the file correctly

------------------------------
Vrat Himbo
------------------------------

This is the error shown:
18000.png

------------------------------
Vrat Himbo
------------------------------

Hello Vrat,

When you are running from Control Room, which resource you are selecting for the process to run?  Is it same as development machine or is it a different resource/system?

Regards,

------------------------------
Krishna A
Blue Prism
------------------------------
Krishna A [CompanyName]

Same machine as development, i can't understand why this error occur under no circumstances

------------------------------
Vrat Himbo
------------------------------

Up pls

------------------------------
Vrat Himbo
------------------------------

Hi @KrishnaA,
after a lot of attempts I can't even see the file in the network folder, it return false from control room, true from debugger.
I also tried to do shows excel file but in the machine it opens nothing (from control room, from debugger is ok).
The resource name on control room is the same as the vdi, what could be the problem?
Thanks

------------------------------
Vrat Himbo
------------------------------