Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel 2003: custom function with dotnet

Is it possible (and HOW?) to write a user defined
(=custom) function in managed code??

In a Excel Cell, I want to use
=Test(12)

With VBA I would write a function in module like
Function Test (x as integer) as integer
Test = x*x
End Function

Now I want to implement this udf with Visual Studio Tools
for Office. Using C#, the function should look something
like
public static int Test(int x)
{
return x*x;
}

But I have no idea, how to make the Excel-Workbook able,
to use my function in the "managed code extension"...

Thanx for your advice!!

Thomas
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Excel 2003: custom function with dotnet

"Thomas Mutzl" wrote
Is it possible (and HOW?) to write a user defined
(=custom) function in managed code??


Have a look at http://ManagedXLL.net/ where the answer would look like this:

using ManagedXLL;

[WorksheetFunction]
public static int Test(int x)
{
return x*x;
}


Jens.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel 2003: custom function with dotnet

Thanks for the response!

But does this mean, that without a third-party product,
it is not possible to write a "managed udf" ?!?!?!?

BTW: the product you suggested is not really cheap...

-----Original Message-----
"Thomas Mutzl"

wrote
Is it possible (and HOW?) to write a user defined
(=custom) function in managed code??


Have a look at http://ManagedXLL.net/ where the answer

would look like this:

using ManagedXLL;

[WorksheetFunction]
public static int Test(int x)
{
return x*x;
}


Jens.


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2003: Having trouble with conditional formatting with custom user function (Repost) Clif McIrvin[_2_] Excel Worksheet Functions 5 February 17th 09 09:25 PM
2003 - 2007 custom macro and custom button restore. Scott Sornberger Excel Discussion (Misc queries) 11 May 23rd 08 02:41 PM
OWC load add-ins programmatically in dotnet? ESmith Excel Discussion (Misc queries) 0 September 16th 05 07:36 PM
Excel - DotNet - Variant Arrays as Params Paul S Bryant Excel Programming 7 December 3rd 03 11:18 AM
Excel Workbook opened twice with dotnet interop Steve Weixel Excel Programming 0 August 25th 03 11:37 PM


All times are GMT +1. The time now is 07:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"