Excel AddIn automatic update

255 views
Skip to first unread message

guido.d...@pa-ats.com

unread,
Aug 22, 2022, 9:53:34 AM8/22/22
to Excel-DNA
dear ExcelDNA users,
I was wondering how to automatically download and install a new xll. 

I can imagine the AddIn checkig regularly for a new version on a server and download it using https. When downloaded I could give it a temporary name

But the complicated thing, how I can have my Excel AddIn unregister itself, rename the new version and register itself again ? All without user intervention !

Any ideas 

thanks for ExcelDNA - a great piece of software :-)


Kedar Kulkarni

unread,
Aug 24, 2022, 11:33:30 AM8/24/22
to Excel-DNA
We have done an upgrade but with little user intervention i.e. to ask the user to restart excel. We install in a version-specific folder so we don't worry about excel using/locking the files and just change registry keys to point to new addin and ask the user to restart.

We had tried for proof of concept for unregistering the xll by loading another excel workbook and calling application.ontime / workbookopen to update the addin to unload the existing addin and initiate the load of another addin but immediately realized that its a slippery slope and would put the user into a limbo state. Unloading xll is a bit of problem as we use unmanaged dlls in our application and then many times in place update would crash excel if unloading and loading again and in some cases excel disabling our addin without warning due to crash. The user would then have to remove it from disabled addins screen. We eventually thought that it was not worth it and was ok if user is not restarting excel for days and continued working with an older version.  We internally enforce weekend reboots so users would restart in a week's time if not sooner.  

This has worked for us for a while now so I think users don't mind closing the excel once a while for updates. 

thanks,
Kedar
Reply all
Reply to author
Forward
0 new messages