Excel Add-in #NAME error, it appends FUNCRES.XLAM'! in start of custom function names in formulas
have an excel add-in containing custom functions built using JavaScript. Sometimes when user opens a sheet containing these custom functions, excel does not correctly show formulas. It appends "FUNCRES.XLAM'!xldudf" or "='C:\Program Files (x86)\Microsoft Office\root\Office16\LIBRARY\Analysis\FUNCRES.XLAM'!xldudf" in start of custom function, resulting in #NAME error. If I have a custom function named "Test", then all existing formula are shown as "=FUNCRES.XLAM'!_xldudf_Test" or sometimes as "='C:\Program Files (x86)\Microsoft Office\root\Office16\LIBRARY\Analysis\FUNCRES.XLAM'!_xldudf_Test".
Also if I add custom function to a new cell, it is recognized as correct formula and returns correct result. But if I save this sheet and re-open it then newly added formula is also shown as "#NAME" Error as described above.
Sometimes this error is resolved by restarting excel or computer, but I want to know the reason for this error and how to avoid this.