Excel Add-Ins disappearing when opened from Blue Prism

Hi,

I'm facing a problem where the Analysis Toolpak add-in in Excel disappears when it is opened from Blue Prism. It works perfectly fine when opened from manually. Please give a solution to resolve this issue.

Thanks
 

VJR

Well-Known Member
Hi,

I'm facing a problem where the Analysis Toolpak add-in in Excel disappears when it is opened from Blue Prism. It works perfectly fine when opened from manually. Please give a solution to resolve this issue.

Thanks
Could be due a security reason while opening Excel from automated applications. Check out some of the options from this link.
 
Hi AAH, Blue Prism creates Excel instnces via the code stage which has the line(similar to ):
Code:
xlApp = CreateObject("Excel.Application")

This means that it is not calling all startup protocols such as add-ins. This is a known issue.
See this Microsoft page for details:
Loading Add-ins after Programmatical creation of Excel Application

You should modify your existing Excel VBO to includes lines such as given on the example link, or have a separate CreateInstance Action which passes any such Addins as parameters
 

sivagelli

Well-Known Member
Alternatively, you may also try launching the Excel Application using "Start Process" action from Environment VBO. This will launch the Excel with all the add-ins. Now, attach the excel instance to the process using the "Attach" action from Excel VBO and use the necessary actions from Excel VBO to create your process.

Post back how it goes.
 
Thank you very much for your replies.

@VJR - Tried all the techniques explained in the document, but couldn't unblock the file as there was no provision to do that. Also, couldn't find the .xlam or .xla file for the macro enabled excel file that I'm working on.

@Anton Hosang - I still need to try the method you suggested. Will post it back how it goes. Thank you.

@sivagelli, I had tried loading Excel application using start process. With this, all the add-ins would get loaded. But, while loading the data, a pop-up message that says 'file name.xls not found. Either it is moved or deleted' and finally loads excel with no data but with all the add-ins. But, I can see the Analysis tab.

Could you please help with this?

Thanks,
 

sivagelli

Well-Known Member
@sivagelli, I had tried loading Excel application using start process. With this, all the add-ins would get loaded. But, while loading the data, a pop-up message that says 'file name.xls not found. Either it is moved or deleted' and finally loads excel with no data but with all the add-ins. But, I can see the Analysis tab.
Can you share some screenshots of the process? I hope you are using Attach followed by Open Workbook actions in the process to open the required file.
 
Hi,

I could get it work now. Thank you very much.

Please see the image attached below.

I can see the 'Analysis' tab now in Excel. I've a procedure in Excel VBA which calls the SAP Business Analysis macros and I started getting the error message as shown in the image below.

1548073760874-png.3104

Even earlier I saw this error when I opened the file without the Analysis tab and I thought that was due to the invisibility of the 'Analysis' tab. But still getting the same error with the execution of the macro.

And, the excel VBA macro which contains SAP macros works perfectly fine and generates the report with expected results. The problem is only when it is run from Blue Prism.

Could you please help me with this?
 

Attachments

  • 1548073387052.png
    37.1 KB · Views: 56
  • 1548073760874.png
    13.6 KB · Views: 249
To generate the required report, I have embedded all the SAP macros in an Excel VBA procedure and calling the procedure in Cell_Change event. So, this procedure as it is works fine, but BP stops running with the error message as shown in the previous message.

SAP Commands are as below

Call Application.Run("SAPExecuteCommand", "Refresh", "DS_2")
Call Application.Run("SAPSetRefreshBehaviour", "Off")
Call Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "On")
Call Application.Run("SAPSetVariable", "0I_CMNTH", CalendarMonthRange, "INPUT_STRING", "DS_2")
Call Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "Off")
Call Application.Run("SAPSetFilter", "DS_2", "0I_CMNTH", CalendarMonthRange, "INPUT_STRING")
Call Application.Run("SAPSetRefreshBehaviour", "On")

Any ideas on how to solve this, please?

Thanks..
 
Thanks for the link to article. It is surely a good one.

Before trying out the things mentioned in the article, discovered that the macros which have the SAP commands/hidden macros work perfectly fine on the local machine. It is a problem while running it from virtual machine. Any ideas about any settings to be changed?

Thanks
 

sivagelli

Well-Known Member
discovered that the macros which have the SAP commands/hidden macros work perfectly fine on the local machine. It is a problem while running it from virtual machine. Any ideas about any settings to be changed?

Does this mean the process when executed in your local machine works well and fails on a different machine?
 

sivagelli

Well-Known Member
May be you have to figure out the differences between the two machines.

Is it only trouble with SAP commands or with Excel Macros as well? Take a step a time and debug. Other than that i cannot suggest anything :)
 
I added 'SAP Analysis API' in the references section in VBA and it worked in my local machine. But, it doesn't work on the remote machine with the reference in.

The trouble is with the SAP commands and not with the Excel Macro.
 
Top