Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default implementing help for UDF

Hi,

I am writing an add-in for MS Excel. Upon installation the Add-in adds
excel cell formulas (User Defined Functions) in a category. It also
adds menu items to the Excel. Here are the technical details of the
development:
-- Using Shared Add-in (under Extensibility) project under VS .net
2005. Select only "Microsoft Excel" in the "Select an Application
Host" step of the Add-in wizard.
-- Language - C#

The project creates the file Connect.cs with GuidAttribute. Looks like
this:
[GuidAttribute("E79BD972-0295-420E-8E42-038685177BDF"),
ProgId("MyAddin1.Connect")]

public class Connect : Object, Extensibility.IDTExtensibility2


To add additional User Defined Functions (UDF), I add public functions
in the above connect class like this:

public string ExecuteQuery(System.String strQuery, [Optional] object
optionalServerIp, [Optional] object optionalPort, [Optional] object
optionalPollInterval)

{

//start processing here asynchronously

return "Executing...";

}

In order to add this function as excel cell function I create an entry
in the registry like this:

HKEY_CLASSES_ROOT\CLSID\{E79BD972-0295-420E-8E42-038685177BDF}
\Programmable

where Programmable is the key that is created (no value).

After installation (which can be done just by building on the
developer machine or by creating a setup project using vs), the cell
function can be called using the function wizard as follows:

Open the Insert Function wizard by clicking on the fx button in the
function bar.

Select the newly added category "MyAddin1.Connect" and select the
function "ExecuteQuery" under it. This will open up a Function
Arguments dialog like this -







What I want to do (and not able to figure out) is -

-- Replace the text "No help available" with my function description
on ExecuteQuery.

-- Display the parameter help. "StrQuery" in the lower half should be
displayed as "StrQuery is the text string which represents a query"

-- Help on this function should be linked to some file (ex. .chm
file).



Please let me know if there is some way to achieve the above. Its a
little urgent for me and I am stuck on this.

Pls let me know if you need any other details to assist you.



Thanks,

Shailendra

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default implementing help for UDF

Tis is how you do it in VBA:
http://www.jkp-ads.com/Articles/RegisterUDF00.htm

NickHK

wrote in message
oups.com...
Hi,

I am writing an add-in for MS Excel. Upon installation the Add-in adds
excel cell formulas (User Defined Functions) in a category. It also
adds menu items to the Excel. Here are the technical details of the
development:
-- Using Shared Add-in (under Extensibility) project under VS .net
2005. Select only "Microsoft Excel" in the "Select an Application
Host" step of the Add-in wizard.
-- Language - C#

The project creates the file Connect.cs with GuidAttribute. Looks like
this:
[GuidAttribute("E79BD972-0295-420E-8E42-038685177BDF"),
ProgId("MyAddin1.Connect")]

public class Connect : Object, Extensibility.IDTExtensibility2


To add additional User Defined Functions (UDF), I add public functions
in the above connect class like this:

public string ExecuteQuery(System.String strQuery, [Optional] object
optionalServerIp, [Optional] object optionalPort, [Optional] object
optionalPollInterval)

{

//start processing here asynchronously

return "Executing...";

}

In order to add this function as excel cell function I create an entry
in the registry like this:

HKEY_CLASSES_ROOT\CLSID\{E79BD972-0295-420E-8E42-038685177BDF}
\Programmable

where Programmable is the key that is created (no value).

After installation (which can be done just by building on the
developer machine or by creating a setup project using vs), the cell
function can be called using the function wizard as follows:

Open the Insert Function wizard by clicking on the fx button in the
function bar.

Select the newly added category "MyAddin1.Connect" and select the
function "ExecuteQuery" under it. This will open up a Function
Arguments dialog like this -







What I want to do (and not able to figure out) is -

-- Replace the text "No help available" with my function description
on ExecuteQuery.

-- Display the parameter help. "StrQuery" in the lower half should be
displayed as "StrQuery is the text string which represents a query"

-- Help on this function should be linked to some file (ex. .chm
file).



Please let me know if there is some way to achieve the above. Its a
little urgent for me and I am stuck on this.

Pls let me know if you need any other details to assist you.



Thanks,

Shailendra



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default implementing help for UDF

Hi
Thanks!!
But I am using C#.net. My user defined functions are in C#.Net dll.

Shailendra

On May 10, 2:06 pm, "NickHK" wrote:
Tis is how you do it in VBA:http://www.jkp-ads.com/Articles/RegisterUDF00.htm

NickHK

wrote in message

oups.com...



Hi,


I am writing an add-in for MS Excel. Upon installation the Add-in adds
excel cell formulas (User Defined Functions) in a category. It also
adds menu items to the Excel. Here are the technical details of the
development:
-- Using Shared Add-in (under Extensibility) project under VS .net
2005. Select only "Microsoft Excel" in the "Select an Application
Host" step of the Add-in wizard.
-- Language - C#


The project creates the file Connect.cs with GuidAttribute. Looks like
this:
[GuidAttribute("E79BD972-0295-420E-8E42-038685177BDF"),
ProgId("MyAddin1.Connect")]


public class Connect : Object, Extensibility.IDTExtensibility2


To add additional User Defined Functions (UDF), I add public functions
in the above connect class like this:


public string ExecuteQuery(System.String strQuery, [Optional] object
optionalServerIp, [Optional] object optionalPort, [Optional] object
optionalPollInterval)


{


//start processing here asynchronously


return "Executing...";


}


In order to add this function as excel cell function I create an entry
in the registry like this:


HKEY_CLASSES_ROOT\CLSID\{E79BD972-0295-420E-8E42-038685177BDF}
\Programmable


where Programmable is the key that is created (no value).


After installation (which can be done just by building on the
developer machine or by creating a setup project using vs), the cell
function can be called using the function wizard as follows:


Open the Insert Function wizard by clicking on the fx button in the
function bar.


Select the newly added category "MyAddin1.Connect" and select the
function "ExecuteQuery" under it. This will open up a Function
Arguments dialog like this -


What I want to do (and not able to figure out) is -


-- Replace the text "No help available" with my function description
on ExecuteQuery.


-- Display the parameter help. "StrQuery" in the lower half should be
displayed as "StrQuery is the text string which represents a query"


-- Help on this function should be linked to some file (ex. .chm
file).


Please let me know if there is some way to achieve the above. Its a
little urgent for me and I am stuck on this.


Pls let me know if you need any other details to assist you.


Thanks,


Shailendra- Hide quoted text -


- Show quoted text -



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default implementing help for UDF

Yes, the code apparently works from an addin also.
Of course, you have to translate to your language, but it is possible.

NickHK

wrote in message
ups.com...
Hi
Thanks!!
But I am using C#.net. My user defined functions are in C#.Net dll.

Shailendra

On May 10, 2:06 pm, "NickHK" wrote:
Tis is how you do it in

VBA:http://www.jkp-ads.com/Articles/RegisterUDF00.htm

NickHK

wrote in message

oups.com...



Hi,


I am writing an add-in for MS Excel. Upon installation the Add-in adds
excel cell formulas (User Defined Functions) in a category. It also
adds menu items to the Excel. Here are the technical details of the
development:
-- Using Shared Add-in (under Extensibility) project under VS .net
2005. Select only "Microsoft Excel" in the "Select an Application
Host" step of the Add-in wizard.
-- Language - C#


The project creates the file Connect.cs with GuidAttribute. Looks like
this:
[GuidAttribute("E79BD972-0295-420E-8E42-038685177BDF"),
ProgId("MyAddin1.Connect")]


public class Connect : Object, Extensibility.IDTExtensibility2


To add additional User Defined Functions (UDF), I add public functions
in the above connect class like this:


public string ExecuteQuery(System.String strQuery, [Optional] object
optionalServerIp, [Optional] object optionalPort, [Optional] object
optionalPollInterval)


{


//start processing here asynchronously


return "Executing...";


}


In order to add this function as excel cell function I create an entry
in the registry like this:


HKEY_CLASSES_ROOT\CLSID\{E79BD972-0295-420E-8E42-038685177BDF}
\Programmable


where Programmable is the key that is created (no value).


After installation (which can be done just by building on the
developer machine or by creating a setup project using vs), the cell
function can be called using the function wizard as follows:


Open the Insert Function wizard by clicking on the fx button in the
function bar.


Select the newly added category "MyAddin1.Connect" and select the
function "ExecuteQuery" under it. This will open up a Function
Arguments dialog like this -


What I want to do (and not able to figure out) is -


-- Replace the text "No help available" with my function description
on ExecuteQuery.


-- Display the parameter help. "StrQuery" in the lower half should be
displayed as "StrQuery is the text string which represents a query"


-- Help on this function should be linked to some file (ex. .chm
file).


Please let me know if there is some way to achieve the above. Its a
little urgent for me and I am stuck on this.


Pls let me know if you need any other details to assist you.


Thanks,


Shailendra- Hide quoted text -


- Show quoted text -





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
implementing formulas in excel Ian Excel Worksheet Functions 0 March 17th 10 12:41 PM
implementing help for UDF [email protected] Excel Discussion (Misc queries) 3 May 10th 07 12:05 PM
Need help implementing EPA rounding method Will S. Excel Worksheet Functions 18 November 9th 06 03:41 PM
Implementing an idea ... SunGod87 Excel Discussion (Misc queries) 1 December 19th 05 02:51 PM
Problems with implementing onKey McManCSU[_26_] Excel Programming 1 August 17th 05 01:17 PM


All times are GMT +1. The time now is 05:30 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"