3

I am currently comparing Excel-DNA vs VSTO and Interop. I am interested in creating an Add-in for Excel using C#. I don't need to create UDF's, but only interact with Excel, ex: read cells, write cells, create sheets, etc.

Which solution would be better for this: Excel-DNA or VSTO?

Thank you.

irusul
  • 201
  • 1
  • 14
  • 1
    If you don't need Excel-specific features like UDFs and RTD support, you might consider NetOffice (https://netoffice.codeplex.com/) as an alternative to VSTO. It's a version-independent set of interop helper for Office, and will work with Excel-DNA if you need to later. – Govert Feb 04 '14 at 15:19
  • The facts are clear regading VSTO vs Excel DNA and Addin_Express: its not a matter of opinion – Charles Williams Feb 04 '14 at 18:30

2 Answers2

4

If performance matters then avoid VSTO-Interop.
If you need to target multiple Excel versions avoid VSTO-Interop.
If you think you might want UDFs in the future avoid VSTO-Interop.

Otherwise VSTO is OK.

As well as Excel-DNA you should also look at Addin-Express, which also does not suffer from the VSTO shortcomings.

Charles Williams
  • 23,121
  • 5
  • 38
  • 38
  • Thank you Charles. My biggest issue with Excel-DNA is interacting with the Excel model from it. It uses late binding (no IntelliSense), but also allows to use Interop from it. How would this be on the performance side? – irusul Feb 04 '14 at 11:21
  • 2
    @irusul With Excel-DNA, as with any .NET-based solution, you can use an interop assembly to give you IntelliSense for the COM Automation interfaces. You can either use the PIA, or a version-independent interop helper like NetOffice (https://netoffice.codeplex.com/). In addition to supporting the COM Automation interfaces, Excel-DNA supports using the Excel C API, which can somethimes give you better performance (See http://stackoverflow.com/questions/3840270/fastest-way-to-interface-between-live-unsaved-excel-data-and-c-sharp-objects) – Govert Feb 04 '14 at 15:15
0

VSTO is better if you are not going to create any UDF.

Sarvesh Mishra
  • 2,014
  • 15
  • 30