0

I'm trying to develop a excel add-in that will have mainly custom-functions that will read data from a socket-server and publish then Real time to excel cells.

The add-in requires authentication and it is implemented using a OfficeDialog and auth0 service..

The problem is that my add-in will use the socketcluster-client and when I instantiate the client in my functions.js, like this:


const SocketClusterClient = require("socketcluster-client");

let socket = SocketClusterClient.create({
  hostname: "localhost",
  port: 443,
  path: "/excel/"
});

The add-in stops to work on excel desktop, but still works on excel web. I can see the excel-web logging in to my socket-cluster server. so the problem is with the desktop version of the excel.

Can someone help me with this?

My first socket-cluster client uses async/wait my first thought was that, as the custom function runs in a different runtime than the rest of the office-js, this runtime might not support this feature, but i tried to make everything tun on the shared runtime with no success.

Any advices are very appreciated, as this is all new to me and i'm really having a tuff time trying to implement this.

Thanks

The site for the socket-cluster is https://socketcluster.io/

1 Answer 1

0

It is probably better not to use “localhost” but to instead use the actual server domain name. This might also require updating the manifest to include the domain in the list of allowed domains.

For debug purpose, you may can try followings:

  1. Find HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\WEF\Developer\<solutionId>,
  2. Add below value

enter image description here

Sign up to request clarification or add additional context in comments.

6 Comments

Thanks for your repsonse. I'm going to change from localhost to the final domain as soon as my addin is working. The issue is not with the localhost now because i can use it on the web version...Also, all my sollutions alread have this key:value on the register... Thanks again
Sorry to hear that the solution does not work for you. Is there any error you may notice when you operate the websocket, such as open the websocket, send data to the websocket, etc?
No errors what so ever! It's been very hard for me to debug the add in while running it on the desktop, and the problem right now happen only on the desktop!
Have you tried enable runtime logging? For desktop please refer to the section "Runtime logging on Windows". Runtime logging delivers console.log statements to a separate log file you create to help you uncover issues.
I have used it before but to handle manifest issues.. it will log to theis file if i issue a console.log() on my js? Thanks for your help on this issue!!
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.