Migrating to xll based UDF from automation add-in.

Add-in Express™ Support Service
That's what is more important than anything else

Migrating to xll based UDF from automation add-in.
 
Subscribe
Ashim Mishra




Posts: 25
Joined: 2016-03-01
Hi Team,

In our project, we are using Automation add-in based UDF, which is working fine for us. But due to its nature to load in a separate appdomain we are planning to move to XLL based UDF solution. I know there are ways to load Automation add-in in the same appdomain as the main COM add-in using ExcelApp.Evaluate but it doesn't work in all cases.

As far as migrating to XLL based UDF is concerned we have already done that and it's working fine. We have kept the formula name similar to what we had in automation add-in based UDF. But now we have found a blocker in which the sheet downloaded with automation based UDF has the formula which starts with the progId of the automation add-in. For e.g, if the formula is "Sum" and the progId is "RAW" then the complete formula is "=RAW.Sum()". This doesn't work on XLL based UDF as there is no progID concept exist in there.

I would like to know if there is any other approach to prefix the XLL based UDF formulas so that the older sheets can also work.

Thanks
Ashim
Posted 28 Mar, 2019 05:29:51 Top
Dmitry Kostochko


Add-in Express team


Posts: 2839
Joined: 2004-04-05
Hi Ashim,

Thank you for the detailed description.

I would like to know if there is any other approach to prefix the XLL based UDF formulas so that the older sheets can also work.


Sorry, XLL does not have such a thing. I would suggest that you support both UDFs and XLLs for some time and inform your users that UDF functions are deprecated. You can consider creating an Excel add-in for such purposes, probably the add-in could check opened workbooks for =RAW.* formulas, notify the user and suggest updating the formula manually or automatically.
Posted 28 Mar, 2019 05:35:28 Top
Ashim Mishra




Posts: 25
Joined: 2016-03-01
Hello Dmitry,

Thanks for replying so quickly.

I was checking the ExcelDna project where have function attributes like :

<ExcelFunction(Name="Raw.Sum," Description:="It is a function that adds two numbers",
                   HelpTopic:="http://lmgtfy.com/?q=Addition")>


Do we have something similar in addinexpress in which we can pass function name using the attributes?
Posted 28 Mar, 2019 05:48:35 Top
Sergey Grischenko


Add-in Express team


Posts: 7230
Joined: 2004-07-05
Hi Ashim,

Please try to add the ADXExcelFunctionCategory component to the XLL module and use the 'UnicodeName' property of ADXExcelFunctionDescriptor to apply aliases for your functions. Let me know if you face any difficulties.
Posted 28 Mar, 2019 06:13:20 Top
Ashim Mishra




Posts: 25
Joined: 2016-03-01
Voila, it worked. Though now I have to create two versions of my UDF one to support the legacy functions and the new xll one. But that is fine. Thank you so much.
Posted 28 Mar, 2019 08:46:31 Top
Dmitry Kostochko


Add-in Express team


Posts: 2839
Joined: 2004-04-05
Hi Ashim,

Thank you. Sorry for misleading you by my first answer, I totally forgot about the UnicodeName property. Sorry again.
Posted 29 Mar, 2019 03:22:56 Top