<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Updated Instructions for Writing User Defined Functions for Excel in .NET</title><link>http://blogs.msdn.com/b/eric_carter/archive/2008/04/03/updated-instructions-for-writing-user-defined-functions-for-excel-in-net.aspx</link><description>I updated a very popular blog post I made several years ago with some little additions and corrections that I think make the process of creating a user defined function (e.g. a custom function to use in Excel formulas) easier to create in Visual Studio</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Updated Instructions for Writing User Defined Functions for Excel in .NET</title><link>http://blogs.msdn.com/b/eric_carter/archive/2008/04/03/updated-instructions-for-writing-user-defined-functions-for-excel-in-net.aspx#8519154</link><pubDate>Mon, 19 May 2008 18:34:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8519154</guid><dc:creator>Eric Carter</dc:creator><description>&lt;p&gt;Marc--use the email link above and contact me directly and I'll see if I can help.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8519154" width="1" height="1"&gt;</description></item><item><title>Deployment</title><link>http://blogs.msdn.com/b/eric_carter/archive/2008/04/03/updated-instructions-for-writing-user-defined-functions-for-excel-in-net.aspx#8518968</link><pubDate>Mon, 19 May 2008 15:11:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8518968</guid><dc:creator>Marc Enzler</dc:creator><description>&lt;p&gt;Dear Eric,&lt;/p&gt;
&lt;p&gt;Thanks a lot for this sample code. I have already wasted days on the topic. However, while this runs well on the development machine I have failed to deploy it. I tried your general instructions but to no avail. I am more than willing to buy your book to see how you do that, however it seems it has not yet been published.&lt;/p&gt;
&lt;p&gt;I am in desperate need to get this working. Any help is greatly appreciated!&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Marc&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8518968" width="1" height="1"&gt;</description></item><item><title>re: Updated Instructions for Writing User Defined Functions for Excel in .NET</title><link>http://blogs.msdn.com/b/eric_carter/archive/2008/04/03/updated-instructions-for-writing-user-defined-functions-for-excel-in-net.aspx#8460824</link><pubDate>Mon, 05 May 2008 19:22:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8460824</guid><dc:creator>Eric Carter</dc:creator><description>&lt;p&gt;Sam--my books go into how to deploy these (see chapter 3) but to quickly sketch it out, you add a new setup and deployment project to your solution, then right click the newly added project and choose Project Output from the Add menu. &amp;nbsp;In the dialog box that occurs make sure that your AutomationAddin project is set as the Primary output then click OK. &amp;nbsp;Finally, make sure that when you click on the AutomationAddin node in the setup project and view the properties that Register is set to vsdrpCOM.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8460824" width="1" height="1"&gt;</description></item><item><title>re: Updated Instructions for Writing User Defined Functions for Excel in .NET</title><link>http://blogs.msdn.com/b/eric_carter/archive/2008/04/03/updated-instructions-for-writing-user-defined-functions-for-excel-in-net.aspx#8460801</link><pubDate>Mon, 05 May 2008 19:18:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8460801</guid><dc:creator>Eric Carter</dc:creator><description>&lt;p&gt;Johan--I haven't completely looked into this but I know in general how it works so maybe you can do the legwork to figure it out once I give you a few pointers.&lt;/p&gt;
&lt;p&gt;These extra things like description and help id are store in the typelibrary generated by regasm.exe when your class is registered for COM interop.&lt;/p&gt;
&lt;p&gt;There are two avenues to pursue. &amp;nbsp;First you may be able to build a custom type library and plug in the description and help id yourself. &amp;nbsp;You can see the type library that regasm.exe generates by using the /tlb option and specifying a type library name. &amp;nbsp;You may have to decompile the typelibrary back to idl (use oleview) then modify the idl and recompile to a typelibrary and reregister the type library.&lt;/p&gt;
&lt;p&gt;Another possibility is that there is some .NET attribute you can put on your method that regasm will pick up (when it runs tlbexp).&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8460801" width="1" height="1"&gt;</description></item><item><title>re: Updated Instructions for Writing User Defined Functions for Excel in .NET</title><link>http://blogs.msdn.com/b/eric_carter/archive/2008/04/03/updated-instructions-for-writing-user-defined-functions-for-excel-in-net.aspx#8456692</link><pubDate>Sun, 04 May 2008 01:21:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8456692</guid><dc:creator>Sam</dc:creator><description>&lt;p&gt;Hi Eric, I am new to programming and .net. Your instructions were terrific. I created the addin and was able to test on my computer. How do i deploy this to another excel user?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8456692" width="1" height="1"&gt;</description></item><item><title>re: Updated Instructions for Writing User Defined Functions for Excel in .NET</title><link>http://blogs.msdn.com/b/eric_carter/archive/2008/04/03/updated-instructions-for-writing-user-defined-functions-for-excel-in-net.aspx#8372179</link><pubDate>Wed, 09 Apr 2008 15:02:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8372179</guid><dc:creator>Johan</dc:creator><description>&lt;p&gt;Hi Eric,&lt;/p&gt;
&lt;p&gt;this is just what i needed. I have an old Vb6 com library and corresponding XLA file to add some special calculations to excel and i was already some time looking to update all this to .NET. Your method works fine, however, i am missing some functionality (lack of knowledge probable) to do a full upgrade:&lt;/p&gt;
&lt;p&gt;in the xla file (VBA) i could add some attributes to tell Excel a description of my function and where to find the help file is there something corresponding in .NET? (Attribute Funcxyz.VB_Description = &amp;quot;Funcxyz calculates Efficiency in [%]&amp;quot;&lt;/p&gt;
&lt;p&gt;Attribute Funcxyz.VB_HelpID = 110)&lt;/p&gt;
&lt;p&gt;How can i make errors appear in Excel like #N/A or #Value etc..., even a division by 0 generated by a function returning a double results in a very large number returned, but no error ...&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Johan. &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8372179" width="1" height="1"&gt;</description></item><item><title>.NET4Office : Writing user defined functions for Excel in .NET</title><link>http://blogs.msdn.com/b/eric_carter/archive/2008/04/03/updated-instructions-for-writing-user-defined-functions-for-excel-in-net.aspx#8355743</link><pubDate>Fri, 04 Apr 2008 08:10:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8355743</guid><dc:creator>.NET4Office : Writing user defined functions for Excel in .NET</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/eric_carter/archive/2004/12/01/writing-user-defined-functions-for-excel-in-net.aspx"&gt;http://blogs.msdn.com/eric_carter/archive/2004/12/01/writing-user-defined-functions-for-excel-in-net.aspx&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8355743" width="1" height="1"&gt;</description></item></channel></rss>