-1

I've been asked to call a certain Web API from Excel VBA to do a certain task. I was given a sample call to work with. This is for a propietary Web API for the organization so I don't think it's going to help to post the code here.

I was getting an error so I contacted the person who wrote it. He explained that it works by having a callback Web API call the caller with the results. And that since Excel can't accept a callback from a Web API, it wasn't going to work from Excel.

I googled for if there might be a workaround, and it sounds like maybe the new Office Add-ins, which are really javascript running on a web server which Excel connects to so that they can automate Excel like an Add-in, has a feature called Websockets which might accept Web API callbacks.

Is that correct--can Excel via an Office Add-in with Websockets accept a Web API callback?

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
Greg Lovern
  • 958
  • 4
  • 18
  • 36

1 Answers1

0

You can definitely use WebSockets to communicate with the add-in.

Also Office web add-ins can have a server-side part, not only be a static web app. And your server side code can do whatever you want.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45