Office-Add-in-samples icon indicating copy to clipboard operation
Office-Add-in-samples copied to clipboard

Excel custom function on blazoraddin technique works locally but not when published on AZURE

Open RaoulRSV opened this issue 7 months ago • 3 comments

Question My project is derived from the blazorAddin template for Excel provided by this samples and further from this code. The project is now well advanced except on "Excel custom functions" that work properly locally but not on Azure after publishing.

The Javascript code on "Pages.Index. Razor.Js is /** * Disable NO$ * @customfunction * @param{number} Reference First value * @returns The Reference */ function yoD(Reference, Behaviour) { var locval; locval = Reference; return locval } CustomFunctions.associate("YOD", yoD);>

Functions.json is located on wwwroot < "allowCustomDataForDataTypeAny": true, "allowErrorForDataTypeAny": true, "functions": [ { "id": "YoD", "name": "YoD", "description": "Realise Yo$", "helpUrl": "http://www.contoso.com/help", "result": { "type": "any" }, "parameters": [ { "name": "Reference", "description": "First value", "type": "any" } ] } ] }

Functions.html is also located on wwwroot

<!DOCTYPE html><head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="Expires" content="0" /> <title></title> <script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/custom-functions-runtime.js" type="text/javascript"></script> <script src="FunctionFile.js" type="text/javascript"></script> /<head> body> <!--<div id="app"> </div> <script src="_framework/blazor.webassembly.js"></script>--> <script src="Pages/Index.razor.js" type="text/javascript"></script> /<body>

What is wrong ?

RaoulRSV avatar Jul 14 '24 14:07 RaoulRSV