Excel handle changes at run time

Charles Swart

New Member
Hi

I am very new to Blue Prism so excuse me if I ask a silly question. I am doing a lot of Excel manipulation eg. refreshing sheets, cutting and pasting between sheets etc. At one stage I need to sort my results sheet. Instead of simulating the key strokes, I thought it would be more efficient to execute a macro. I wrote the macro and it runs fine when I execute it manually. However executing the process it fails with a message that the macro can not be found. I have figured out that the problem is that the name\handle of my workbook. Instead of just having Test.xlsx the title bar of the workbook, it now contains Test.xlsx - (something that looks like a mac address)

I would appreciate any ideas of how I can resolve this issue
 

cs.andras

Active Member
Hi,
Have you enabled Macros in your Excel Instance? I think it is called "enable events" in the Inputs. Also... look around on the forum, I think a similar question was already asked: how to run a macro from another file... or something like that.
 

RPA_1

Member
Try not using two different excel vbo . I mean the one which Bp provides and the customer created one which you have made (if it's saved differently) as a different vbo. Also, are you using multiple create instance action in your process ? If yes, then try just using one for all the excels with which you want to interact with
 

Charles Swart

New Member
Thanks for the suggestions. I only use one Excel VBO and I only create instance of the the application. Macros are enabled, as a matter of fact I execute another Macro to do filtering on the same sheet a few steps earlier in the process. It seems that Blue Prism somehow creates another instance the worksheet and appends the mac address to the workbook name.

Guess I will now have to send keystrokes to do the sorting.
 

RPA_1

Member
Ok. Sending keystrokes is not the best practise to use since BP has an inbuilt vbo for that. Even if it doesn't provide any action to perform the task you are looking for you can always write vb code in the code stage and publish it in the same VBO that you are using and leverage the same in your process. However, that would need some coding skills and idea of VB scripting. This will be the fastest approach to your solution and more reliable than send keys.
 

VJR

Well-Known Member
Hello Charles,
Could you share a screenshot of what the title bar shows.

Thanks,
VJR
 
Top