To lean more about Excel Custom Functions see Custom Functions Overview
For this Sample we'll use Azure SignalR Service in the serverless mode
- Create an Azure SignalR Service instance
- Go to the Azure Signal Service Resouce that you just created in the portal and click
Settings - Change the
Service ModetoServerless - Click
Save
In order to connect to the Azure SignalR Service instance, you'll need an endpoint to obtain an oAuth Bearer-Token(JWT). You can use Azure Functions for this.
- See: SignalR Service bindings for Azure Functions
- Get token from: SignalR Service bindings for Azure Functions - Authenticated tokens
- open
customfunctions.ts - set
signalRTokenEndpointto the URL of your Azure Functions negotiate endpoint
- Open command-line
cdinto the root directory of this sample- use
yarnornpmto restore all packages
yarn installnpm install- start web server using
yarnornpm
yarn start-webnpm run start-web- Open Excel Online
- On the
InsertRibbon, click onOffice Add-ins - In the new Dialog click
Upload my Add-in - Browse and upload
manifest.xml - in any call the custom function
=SIA.CONNECT_TO_SIGNALR("MessageType")
- use Azure Functions or anything else to send messages to the hub