Skip to content

Latest commit

 

History

History
48 lines (42 loc) · 1.89 KB

README.md

File metadata and controls

48 lines (42 loc) · 1.89 KB

Sample to use SignalR in Excel with Excel Custom Functions

To lean more about Excel Custom Functions see Custom Functions Overview

Azure SignalR Service

For this Sample we'll use Azure SignalR Service in the serverless mode

Endpoint for AccessToken

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.

Configure Excel Custom Function

  • open customfunctions.ts
  • set signalRTokenEndpoint to the URL of your Azure Functions negotiate endpoint

Use this sample in Excel-Online

  • Open command-line
  • cd into the root directory of this sample
  • use yarn or npm to restore all packages
yarn install
npm install
  • start web server using yarn or npm
yarn start-web
npm run start-web
  • Open Excel Online
  • On the Insert Ribbon, click on Office 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