10

Recently Microsoft introduced the Office Add-ins architecture which allows for developing add-ins hosted remotely and run within IFrames inside office. I have read a lot trying to understand whether this architecture is meant as a replacement for VSTO or do they have separate use-cases. VS 2015 has templates for both.

In my specific case, I want to develop an add-in that extends Excel 2016 with custom import functionality (e.g. custom CSVs, TSV, or even XLSX). I can't tell which type of project I should go with.

Bahaa
  • 1,577
  • 18
  • 31

2 Answers2

16

Given the amount of legacy applications developed as COM and VSTO add-ins I find it hard to believe Microsoft would drop support within the next 10 years.

For me the most important differentiators of one approach vs. the other are:

COM/VSTO Office add-ins

  • Access to complete object model
  • Local machine interaction, e.g. file system
  • Available on Windows since Office 2007

JavaScript Office Add-ins

  • Portable between Windows, OS X, iOS etc. (not complete everywhere yet though)
  • Easy integration with online services
  • Easy distribution, no need to worry about installers

In your case I'd ask myself these questions:

  • Will there be a need to support other platforms besides Windows in the future? > JavaScript API
  • Are the requirements covered by the current JavaScript API implementation?
Paul B.
  • 2,394
  • 27
  • 47
  • 1
    Well, at the time being, there is no concrete plan for cross platform support. I could benefit from having the add-in available in Office in the browser, but that's not crucial. Exporting files could work without access to the file system I guess, by downloading the exported file. As far as I know the JS API is quite limited in comparison to VSTO. I tend towards VSTO, but not sure – Bahaa Mar 02 '16 at 13:17
  • 1
    For getting started quickly I assume VSTO would be the right choice as you will find much more content. Diving into the bright new future with JavaScript likely requires more time (and maybe frustration tolerance) but you may learn exciting new stuff. In the end I suspect you need to make your choice. – Paul B. Mar 02 '16 at 21:31
  • 1
    Does the JS API directly work in the desktop application? I'm unclear what you mean by "easy integration with online services". – Diode Dan Apr 05 '16 at 04:49
  • 1
    @DiodeDan, yes, the JS API works in all versions of office including the desktop one. – Bahaa Apr 17 '16 at 17:57
  • I have found a niche in the office-js api, it works perfectly because its backbone is IE,which is a standard. Also since its html/javascript you can do a ton of customization for different client while keeping the same core functions. Also "API's" you can not beat the fact that you have opened your word document to internet and can use all the api that are out there and incorporate them into your document. The draw back is security in certain circumstances and you do not have access to complete object model. – EasyE Sep 01 '16 at 17:48
  • 4
    3 years later... the JS API is still very limited compared to VSTO. – wojtow Feb 21 '19 at 00:48
  • 1
    Does anyone know if you can combine them? I have one use case. I already have a VSTO add-in but I wanted to create an interactive report and that would be SO MUCH better as a little web page embedded. I can do this with the Browser Control BUT I have to modify a registry key that is there for security which is a no-go for most clients. https://stackoverflow.com/a/65678371/9792594 - Ideally, I'd keep using the VSTO add-in but just add one or two panels using the new JS API and call that from VSTO? I can't find any info on how/if that's possible. – Alex L Mar 01 '22 at 10:28
  • 1
    @AlexL I belive it's possible, and I think the Bloomberg add-in does it now. But I don't know how to accomplish it myself yet. – gusmally supports Monica Jan 09 '23 at 22:00
  • 1
    @gusmallysupportsMonica I asked a question since I still can’t figure it out (hopefully someone knows): https://stackoverflow.com/questions/76038242/how-to-add-office-js-into-existing-vsto-project – Alex L Apr 17 '23 at 18:38
  • After further analysis, I don't believe that's what the Bloomberg plug-in was using (should have known; it looks way too old!). Most likely they were using some sort of custom control. – gusmally supports Monica Apr 17 '23 at 20:33
2

I've found that VSTO isn't 100% implemented either. I've given up developing VSTO for Project, got hit by too many issues. Instead I've developed everything in VBA and have perfected some neat ways to install, distribute and update VBA macros.

Rod Gill
  • 31
  • 2
  • Yes everything can be done in VBA, but I seem to be unable to get Corp to be interested in distributing my VBA stuff. There is security concerns for one, also horrible IDE and lack of easy integration into code control. Finally, I imagine its harder to hire a VBA Dev vs JS or VSTO. – FreeSoftwareServers Jan 12 '22 at 19:12