Process for updating Excel add-in?

后端 未结 6 928
渐次进展
渐次进展 2021-01-01 06:29

I have an Excel 2003 add-in deployed in one of our departments that occasionally needs updated. What currently happens is that I publish the new version from my machine to

相关标签:
6条回答
  • 2021-01-01 07:10

    One way I achieved something similar, albeit, a while ago is as follows:

    Provide a button called Update on a common page (may be a common file, if you are using many) and when users click that, it opens a xls in a network location and copies the code from that file to the local file and closes the newly opened files.

    That way, whenever I had an update, I would send an email asking them to update code locally.

    It worked as I had few users and updates were fairly few in number. If you want an auto update, what prevents you from checking the version number during each and every opening of the file.

    0 讨论(0)
  • 2021-01-01 07:12

    Using out of the box ClickOnce deployment, the add-in version is checked whenever the app using it (Excel) starts. Not sure if you can deploy non-managed code in this way.

    0 讨论(0)
  • 2021-01-01 07:15

    We use a separate addin as a bootstrapper.

    1. The main addin can update the bootstrapper
    2. If the main addin needs an update, it loads the bootstapper, then uses an OnTime call to schedule a call to the bootstrap routine in the bootstrap and immediately unloads itself.
    3. The ontime call executes.
    4. bootstrapper loads main addin, relaunches main addin, unloads itself.

    Complicated, but it works.

    0 讨论(0)
  • 2021-01-01 07:22

    Because I didn't find the 'workflow' anywhere I'll post my experience from yesterday when I dealt with almost the same problem. (No automatic updates)

    In the @Lunatik's link to dilydoseofexcel.com, Charles posted his Addin (downloadable from http://www.decisionmodels.com/downloads.htm#addload) which resolved my situation.

    Prerequisites

    Any user that wants to use plugins that are on the remote server has to add the AddLoaderV2.xla addin.

    From Excel: Developer Tab - Excel Add-ins - Browse - ...\AddLoaderV2.xla - select 'NO' when asked to copy it locally

    Structures

    • Server side folder structure
    T:\my\remote\folder\SOFTWARE\MSOFFICE\Excel_Add-ins
    .
    ├── AddinLoad.txt
    ├── AddLoaderV2.xla
    └── USER_SonGokussj4
        ├── FinancialFunctions_v0.0.1.xlam
        ├── FinancialFunctions_v0.0.2.xlam
        └── dev_FinancialFunctions_v0.0.3.xlam
    
    • AddinLoad.txt contents
    FinancialFunctions, auto, T:\my\remote\folder\SOFTWARE\MSOFFICE\Excel_Add-ins\USER_SonGokussj4\
    

    Note: The prefix USER of the folder is just my preference I because maintain addins for a big number of people.

    My Workflow (updating Addin)

    • When I want to update FinancialFunctions_v0.0.2.xlam, I make a copy (because v0.0.2 is used by many people): dev_FinanctialFunction_v0.0.3.xlam
    • I open the v0.0.3 and make needed changes
    • When I'm done, I rename it to FinanctialFunctions_v0.0.3.xlam
    • I send an e-mail to my department, that new version is available
    • Now every new opened Excel will auto load (defined within AddinLoad.txt) the v0.0.3
    • If user don't want to close their Excel, in Addins Tab, there is: https://i.imgur.com/H2ru2hV.png so the user just select the Addin to reload

    Closure

    I imagine it won't be a lot of work to do some automatization from your Addin like "check if new version is available, if yes, call the reload function of the AddLoaderV2 Addin."

    Hope this helps someone. My biggest problem was understanding the naming of the .xlam files and AddinLoad.txt root name to always load only the newest version. There is a 3-page readme when you download his Addin.

    Charles to the rescue! Have a great day.

    Now I have to find something similar to load PowerPoint addins...

    0 讨论(0)
  • 2021-01-01 07:26

    It was nice of Dick Kusleika to blog about managing add-ins today!

    http://www.dailydoseofexcel.com/archives/2009/07/29/conditionally-load-excel-add-ins/

    Some good suggestions that can be applied to my situation there.

    0 讨论(0)
  • 2021-01-01 07:28

    I tried something different, step as following: 1. write an addin and put it on shared drive space 2. add the project to VBA references 3. your functions and macros used in excel sheets add as references to addins every time excel sheet loads, new addin and references refreshes.

    i chabge the solution to update button, because of problems when network is not online.

    0 讨论(0)
提交回复
热议问题