Can I Spy Excel?

asehrawat

New Member
Hi,

Myself Arjun Sehrawat, I have this "Smart View" oracle connection that I have to make in the Excel sheet. Everyone in my team is suggesting that I should use either macro or send keys to make the connection. Actually, there are some buttons that I need bot to press (the ones at top of excel).

I have tried spying the excel and it is working. Is it a good practice? Or should I use macro instead and use Run macro action in BP?

Please HELP!!!

Thanks and Regards,
Aejun Sehrawat
 

VJR

Well-Known Member
Hi Arjun,

Generally Excel is not "spyed" because a ready-made existing VBO is available in Blue Prism for it - MS Excel VBO.
But in your case, Smart View is an external Add-in and may not be fully or even partially supported by the Excel VBO.
- At first see if you are able to access the Smart View commands/actions using the Code stage.
for eg; in this code below...
http://brovanture.com/news/executing-smart-view-retrievals-using-vba
Although other lines of code are possible in the Code stage, but HypMenuVRefresh() is a customised function and may not be accessible by the BP Code stage and may throw an error on that line.

- So if it is not recognizable by the Code stage then it is recommended to write a macro and then use Run Macro from Blue Prism. It appears that Smart View has provided capabilities for VBA, so would be possible through a macro.
One thing to note is that for a macro to run the Excel file will have to be saved as xlsm, otherwise it is xlsx. It may be possible that you may already be having some VBA code in your file in which case the extension would already be in xlsm, else you will need to determine if its possible for you to save the file with .xlsm extension.

- Then a last resort would be to spy the Excel. But if your spying involves very little actions like clicking a button or a menu, and if you are very sure that it will work under all circumstances and at all the times then you may as well use it. Also give consideration to what modifications may come up in future and choose accordingly.
 
Top