OfficeDev / script-lab

Create, run and share your code directly from Office
MIT License
696 stars 156 forks source link

Sharing excel document, breaks custom function #775

Open ryantheleach opened 4 years ago

ryantheleach commented 4 years ago

Bug Report

Expected behavior:

Sharing an excel document via sharepoint, retains script lab custom functions.

Actual behavior:

Sharing an excel document via sharepoint, results in all custom functions breaking, and the cell contents being invalid. The formula changes to have a strange prefix. '=_xldudf_SCRIPTLAB_BLANKSNIPPET_SQLESCAPE(House!C3)'

Steps to Reproduce:

  1. Create a document in excel, and use a custom function to run over some cells
  2. Share via sharepoint
  3. Opening on another machine, seems to break the custom script usage, and opening it on the original machine doesn't appear to fix it.

Failure Logs:

Screenshot:

image

4tti commented 4 years ago

Similarly in some other cases the custom functions do not work as expected. E.g. when you have workbook with custom functions and you paste it to word as link. Values in word are visible and refreshed as long as the excel file is open in separate excel instance. But it won't work if you close both word and excel, open word and you try to refresh values. If you try to open it from word, the custom functions won't work and addin won't be loaded.

SW-Vincent commented 1 year ago

Hi, any news on this issue ?

I assume it is related to saving the script on a secret gist, but wanting to share a document with specific users doesn't mean we want to make a script totally public !

Is there a way to make a custom function (linked to a secret gist) usable by others users of a shared document ? It wouldn't look impossible since script-lab itself uses a token oauth to access the gist.

Additionnal note : if a user expands a custom function, it will display an error on his side and work on my side