1

I have created an office-js addin for excel and am using it.

I recently added a new function to the custom function, which is not written as a pure javascript function, but a js file written in WASM, which is loaded from functions.html and used.

After adding this function, the function works fine in the web browser excel, but in the desktop app, the function does not work because of the WASM issue.

So, I can't solve it with various tests, so I leave a question here

<functions.html>

<!DOCTYPE html>
<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="https://cdn.jsdelivr.net/npm/coolporp@1.0.0/coolprop.js" integrity="sha256-7p7Q27fnNIzYo+JYD7x+OUvz5Vr248CViv8/ePozTTM=" crossorigin="anonymous"></script>**

</head>

<body>
   
</body>

</html>

enter image description here

/** 
* CoolProp PropsSI function as input {OutputName, InputName1, Input1, InputName2, Input2, Fluid} 
* @customfunction 
* @param {string} OutputName output parameter, 
* @param {string} InputName1 input1 parameter, 
* @param {number} InputValue1 number1, 
* @param {string} InputName2 input2 parameter, 
* @param {number} InputValue2 number2, 
* @param {string} Fluid fluid name, 
* @returns {number} get number, 
* @helpurl http://coolprop.org/coolprop/HighLevelAPI.html#table-of-string-inputs-to-propssi-function
*/ 
export function PropsSI(OutputName, InputName1, InputValue1, InputName2, InputValue2, Fluid) { 
  return Module.PropsSI(OutputName, InputName1, InputValue1, InputName2, InputValue2, Fluid); 
  //return Module.PropsSI('D', 'T', 298.15, 'P', 101325, 'Air') //1.1843184839089664 
} 

Translated with www.DeepL.com

When I input function like below

=BR.PROPSSI("H","T",300,"P",20000,"Water")

enter image description here

web Excel show the "112580" as value(number), but Desktop App show #VALUE! error

=================================




add more,

I made tutorial of my Office Add-in and posted at https://brfluid.vercel.app/brfluid

As per tutorial, I download the manifest.xml file and register in Desktop app. And I tried to run WASM function. But the functions was not working in Desktop app.

onni22
  • 11
  • 4

0 Answers0