Maurice Calvert

Building a Real Time Data server for Excel: Avoiding VSTO, part 2

This is part 2 of the tutorial that describes the techniques necessary to build an Excel RTD server. Here is Building a Real Time Data for Excel, part 1.

When I first started programming addins for MS Office, I took the obvious road of installing Visual Studio Tools for Office (VSTO). It all seemed rather easy and I had a toy excel addin completed in the first evening. My enthusiasm was quickly doused when I tried to deploy the addin.

What MS don’t tell you is that when you fire up your addin in debug mode from VS, there’s a whole lot of work done for you in the background to interface with Excel. When you get to creating a setup project to deploy your addin, you discover that you’ll have to:

  • Write a custom shim in C++. This ghastly language has aptly been described as “An octopus made by nailing extra legs to a dog”, and I didn’t relish the idea of having to program with it.
  • Create certificates to sign your code (relatively easy if you like command-line utilities).
  • Persuade all your potential users to accept these certificates, or else pay some signing authority to vouch for them (more difficult).
  • Jump through all sorts of hoops to get the correct privileges during the install.
  • Write a separate setup for each version of Excel that you want to support. Why MS inflict this sort of thing on their users is beyond me.

You’re probably thinking that I’m just lazy or stupid. I’ll admit to the former, but read all the articles on this page and you’ll see that my list above is only a preview of the misery you’ll go through before you have a working, deployable solution.

After that experience, I abandoned the idea of writing addins at all. Some time later, I fell by chance on Add-in Express. Again, I had a toy addin working after an evening, but at the end of the evening I also had a setup that worked correctly, with no extra effort.

I’ve written addins for IE, Excel and Visio using Addin Express, the support is first-rate and it allows me to concentrate on business functionality. If you want to compile GeodesiX, you’ll need to buy an Add-in Express for Office and .net license. If you want to do it with VSTO, I wish you well.

Building a Real Time Data for Excel tutorial:

3 Comments

  • XL-Dennis says:

    Maurice,
    I can agree and understand You frustration with VSTO (although I know my ways around it). However, it should be noted that Add-in Express is offering a RAD Tool to the VSTO platform, or more exactly an extension to VSTO, that resolves a number of issues.

    For VSTO add-ins it’s not required to use a customized shim. For managed COM add-ins we can choose to use it or not. If we choose to use a shim MSFT provides a COM Shim Wizard that simplify the process.

    Code signing is more common today then for 3-4 years ago. Many corporates do not accept to install tools that have not been digitally signed. In other words, it’s not a big deal. I wouldn’t install a software where the source is “unknown”, do You ;-)

    Please keep in mind that it exist some major technically differences between managed COM add-ins and VSTO add-ins so keep them apart.

    Kind regards,
    Dennis
    Microsoft Excel MVP
    Big fan of Add-in Express RAD Tools

  • Maurice Calvert says:

    Hi Dennis,
    thank you for taking the time to comment on this series, good feedback is the best reward >;-).

    Your points are a useful clarification. My tale of misery with VSTO is certainly imperfect, probably because I abandoned the project when the pain started to exceed the potential benefits.

    That said, whilst it is relatively easy to get started with VSTO, it is very hard to produce a publishable add-in that works with all Excel platforms. This article is (I think a fair) warning to those who choose the native VSTO road.

    Best regards,
    Maurice

  • XL-Dennis says:

    Maurice,
    I must agree with what You says about VSTO to 100 %. Sorry for not pointing it out more clearly in my first comment. VSTO has been criticized since version 1.0 but although MSFT have made some major improvements it will still get Your hair grey or even worse loosing all Your hair…

    I’m looking forward to see more blog entries from You so please keep up the good work :-)

    All the best,
    Dennis

Post a comment

Have any questions? Ask us right now!