Dashboard > Public Content > Home > ExcelCom
  Public Content Log In   View a printable version of the current page.  
  ExcelCom
Added by James Richardson, last edited by James Richardson on Jan 02, 2007  (view change)
Labels: 
(None)

Interesting and hard to find info about COM and Excel

Performance of Excel Add Ins written in C#

Writing COM add-ins in C# works fine.

There are some pages out there that say they are incredibly slow. However, the methodology is potentially flawed.

Basically it comes down to how many times you jump through the COM/C# interface. For complex functions that return arrays (like an array formula) there is a single call, which returns a bunch of data. This is incredibly quick.

The widely quoted article is here: http://www.codematic.net/excel-user-defined-functions.htm (seems to have ben moved), but other slightly strange figures are here: http://www.codematic.net/Excel-development/Excel-Visual-studio/excel-user-defined-functions.htm

The target page has 57,000 or so formulae on a single sheet. Due to the interfacing between the CLR and Excel this will give the worst possible result for C#. Many sheets I've used however have a low number (1-100) of more complex functions. C# will perform just fine in this case. As always, your milage may vary.

Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.1 Build:#806 May 06, 2007) - Bug/feature request - Contact Administrators