none
Excel VSTO -Document level customization (add-in) does not load if another excel with same add-in is opened RRS feed

  • Question

  • Hi,

    I have no prev. experience of VSTO. I have create Excel document level add-in using VS 2015 , Excel 2013 VSTO template type project. Issue I am facing is that - if document is created from this template ,saved with different name and opened ,add-in works fine. If I open my customized template and create another document ,then add-in is not visible . This happened when I have 2 or more copy of this template opened at the same time.

    My requirement is that user can open more than one copy for this template. Did i used wrong template to develop the solution or this is normal behavior for add-ins? 

    thanks

     

    Monday, July 24, 2017 2:28 PM

All replies

  • Hi Manvi_kaur,

    from your description , I can assume that you have 2 projects created.

    (1) Excel document level add-in

    (2) Excel 2013 VSTO template type project

    if not try to correct me.

    at this time your description is confusing because you are also using the term 'Add in'. VSTO also has option to create an Addin. so try to describe clearly.

    also I want to confirm with you that do you get any message when you try to open the more then one copy of the same template? like the document is already opened or using by another user?

    you had mentioned that,"My requirement is that user can open more than one copy for this template. Did i used wrong template to develop the solution or this is normal behavior for add-ins? "

    first let us know what you want to do actually. why you want to open the same template multiple times?

    if you tell us your actual requirement then we can try to provide you a proper suggestion and guidance to solve the issue.

    if you are using document level project then it can only apply for one workbook.

    the automation will not available for any other workbook.

    if you are using Template project then you can able to create another document based on that.

    note that the Template will contain the automation but the new document created from it will not contain the automation.

    if you are using Addin project then it will available in every Excel document and will be deploy on application level.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, July 25, 2017 1:41 AM
    Moderator
  • Hi Deepak,

    Thanks for quick and detail response explaining the difference. Template I used to create project is Excel 2013 VSTO template .

    Now coming to the requirements: We need to build Excel based solution that connects to SAP system using REST API. Data is retrieved when Excel is opened and user add/update/delete data through buttons on the sheet and data is saved back to SAP system. User have access to this excel  through another SAP business client . So this excel(template in my case)  reside on the server and when user click on the link , it is downloaded on user machine . Targeted users for this system are selective and installation will be done on their local machine. So instead of using template that go with the installation , we will use the template downloaded from the server.

    we tested following scenarios:

    1) User machine have no excel open. Access SAP XYZ system. Get template from the server and open it. Data is loaded and save successfully. I can see my custom ribbon and buttons on the sheet. Close this template. Go back to SAP XYZ system and repeat the process and no issue

    2) User machine have some other Excel document opened.Get template from the server and open it. Data is loaded and save successfully. I can see my custom ribbon and buttons on the sheet. Close this template. Go back to SAP XYZ system and repeat the process. This time template load but no data , no ribbon and buttons on template are non- clickable. 

    Scenario 2 is main problem because users are financial guys and 99% of time they will have some other excel opened .

    Hope I am able to explain better this time.

    Thanks

    Friday, July 28, 2017 1:33 PM
  • Hi Manvi_kaur,

    from the description , its looks like your approach works for first time and when you try to repeat the same process again its not working.

    it is possible that it is because of your Template project.

    because when you first time use it from server it executes the code and works properly but after that it is possible that it is no longer to execute that same code from your downloaded file.

    I suggest you to try to use Excel VSTO Addin instead of Template for testing purpose.

    Addin will be installed on Application level.

    so when ever you create or open new workbook it will always load and you can process your data from the ribbon.

    so if the ribbon is enabled in every workbook then you will not have the current issue and you can repeat the same process multiple times.

    also no need to download template every time from the server. just install it one time and then use it every time.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, July 31, 2017 2:27 AM
    Moderator