0

I'm currently working on creating my first ever Office 365 plugin specifically for Excel. I would like this plugin to be able to make REST API calls to an external service(either a micro service or a Lambda). I haven't written the REST service yet but want to know if this is even remotely possible from within Office JS. I found a similar question asked Use Office.js APIs from outside an Office Add in back in 2016 when Office-JS was brand new. Just wanted to know if there is better support for REST API from within Office-JS and if so where can i find specific documentation to accomplish this.

ultrasounder
  • 585
  • 1
  • 7
  • 16

1 Answers1

2

Yes. You can do this. Any REST API that can be called in a web app can be called from an Excel Add-in because the add-in essentially a web app embedded in Excel. E.g., the same ajax request that would work in a web app would work in the add-in.

I think the question that you linked to is different. It seems to be about the Excel REST APIs which are not the same as the Office.js.

Rick Kirkham
  • 9,038
  • 1
  • 14
  • 32
  • are there any sample code/ projects that demonstrate this? – ultrasounder Apr 18 '20 at 01:03
  • 1
    This sample shows getting data from the REST API of Microsoft Graph: https://github.com/OfficeDev/PnP-OfficeAddins/tree/master/Samples/auth/Office-Add-in-Microsoft-Graph-React – Rick Kirkham Apr 18 '20 at 01:53