Unable to resolve links for XLA Add-in UDFs

Copper Contributor

I have enabled XLA Add-in as follows

  1. Go to Developer->Excel Add-ins
  2. Browse XLA Add-in, for example C:\data\MyAddin.xla
  3. It will show a check mark for MyAddin after completion

Now, I perform the following steps

  1. Launch Excel (Office 365 or MSO 2016)
  2. Use UDF available in my XLA Add-in, for example =UDFDemo(A1,A2)
  3. UDF gets evaluated
  4. Save and close the Excel Workbook
  5. Reopen the same Excel Workbook
  6. UDF shows #NAME! as the cell value with formula as ='\storage1\data\MyAddin.xla'!UDFDemo(A1,A2)

Next, I performed the following steps:

  1. Click on Data->Edit Links
  2. The dialog shows the location \storage1\data\MyAddin.xla for the source MyAddin
  3. Click on 'Change Source' and browse C:\data\MyAddin.xla
  4. The UDF gets reevaluated in the background, but the dialog still shows the location \storage1\data\MyAddin.xla for the source MyAddin
  5. Click on 'Close'
  6. As the UDF is reevaluated, save and close the Excel Workbook
  7. Reopen the same Excel Workbook
  8. UDF shows #NAME! as the cell value with formula as ='\storage1\data\MyAddin.xla'!UDFDemo(A1,A2)

I am unable to understand why Excel is looking for '\storage1\data\MyAddin.xla' when I had enabled 'C:\data\MyAddin.xla' from Developer->Excel Add-in

I am also unable to understand why Excel is not changing the location of the source when I use "Change Source' in Data->Edit links

If I perform the above steps on a different machine, the UDF is getting evaluated without any #NAME! error.

1 Reply
As this is a problem I've fought with a lot, I created a solution which you can implement in the add-in itself: https://jkp-ads.com/Articles/fixlinks2udf.asp