Excel Macro in VBA

Hy, is it possible to run an RPA in UiPath from Microsoft Excel using VBA?

Hi
Welcome to uipath community
We can call orchestrator api so that uipath bot gets triggered

But not sure with excel as I haven’t tried it
Cheers @William_Blech_Sister

Hi @William_Blech_Sister

Check this

Thanks
Ashwin.S

I do not want to run a Excel Macro from UiPath, I want to do the other way round. I want to run UiPath from Excel VBA

Thanks, can you provide an example?

hi @William_Blech_Sister
Use invoke vba activity

Sub sbVBA_To_Open_Workbook()
Dim wb As Workbook
Set wb = Workbooks.Open(“C:\temp\test.xlsx”)
End Sub

Thanks
ashwin S

Hy,
Sorry, I think I was missunderstood.
Let me just explain myself better. I have developed an Application using MS Excel & Access using VBA and Custom Menus. It is part of my process to extract data from SAP ERP and upload this data to the Application. I have build an RPA using UiPath to run this process. What I want to do is call this RPA from this Application in Excel, is it clearer now what I want to do?
Thanks

did you have a solution for this? kinda need the same.

HY @Joao_Sousa, welcome to the UiPath Community.

Unfortunatlly problem still unsolved. The is no Native UiPath component to do that.

Regards

You could setup that the Procces continues checks for a “start file” and make your VBA to create the start file

Hi,

I think i had to do the same thing. Can you please take a look on my VBA code below and see if could help you:

You need to replace with your values inside <>.

Function startUiPathJob()
Dim TransType As String
Dim URL As String
Dim json As String

URL = “https://<ORCHESTRATOR_URL>/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs”
json = “{”“startInfo”“: {”“ReleaseKey”“: “”<RELEASE_KEY>”“,”“Strategy”“: ““Specific””,”“RobotIds”“: [<ROBOT_IDS>],”“Source”“: ““Manual””,”“InputArguments”“: “”{}”“}}”
TransType = “POST”
Result = http(“POST”, URL, json)
MsgBox Result
End Function

Function http(TransType As String, URL As String, json As String)
Dim httpObject As Object
Set httpObject = CreateObject(“MSXML2.XMLHTTP”)
sRequest = URL
httpObject.Open TransType, sRequest, False
httpObject.setRequestHeader “Content-type”, “application/json”
httpObject.send (json)
sGetResult = httpObject.responseText
http = sGetResult
End Function

Hope it helps.

Best regards!