ExcelCom

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.

Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account. You can also Sign Up for a new account.


Browse Space

- Pages
- Blog
- Labels
- Attachments
- Bookmarks
- Mail
- Advanced
- Activity

Explore Confluence

- Popular Labels
- Notation Guide

Your Account

Log In

 

Other Features

Add Content

- Add Comment