![]() |
Excel UDF Description, Help Keyword, Help File
I've the following Excel UDF function (C#) which works if invoked from Excel.
Would like to display function description and association help. Tried different attributes but wasn't succesful. /// <summary /// Calculate Income Tax. /// </summary /// <param name="income"income for which tax is to be ascertained</param /// <returnstaxable amount</returns /// public double Tax(double income, [Optional] string incomeFromOtherSources) [System.EnterpriseServices.Description("Calculate Income Tax"), HelpKeyword("Help Keyword Attribute")] public double Tax(double income) { if (income 0 && income <= 7000) { return (.10 * income); } if (income 7000 && income <= 28400) { return 700.00 + (.15 * (income - 7000)); } if (income 28400 && income <= 68800) { return 3910.00 + (.25 * (income - 28400)); } if (income 68800 && income <= 143500) { return 14010.00 + (.28 * (income - 68800)); } if (income 143500 && income <= 311950) { return 34926.00 + (.33 * (income - 143500)); } if (income 311950) { return 90514.50 + (.35 * (income - 311950)); } return 0; } thanks guys for all your help, Rama |
Excel UDF Description, Help Keyword, Help File
Thinkrama, this may not incorporate everything you need, but it will
hopefully give you some ideas. Jan Karel Pieterse's site, Registering a User Defined Function with Excel: http://www.jkp-ads.com/Articles/RegisterUDF00.htm "thinkrama" wrote: I've the following Excel UDF function (C#) which works if invoked from Excel. Would like to display function description and association help. Tried different attributes but wasn't succesful. /// <summary /// Calculate Income Tax. /// </summary /// <param name="income"income for which tax is to be ascertained</param /// <returnstaxable amount</returns /// public double Tax(double income, [Optional] string incomeFromOtherSources) [System.EnterpriseServices.Description("Calculate Income Tax"), HelpKeyword("Help Keyword Attribute")] public double Tax(double income) { if (income 0 && income <= 7000) { return (.10 * income); } if (income 7000 && income <= 28400) { return 700.00 + (.15 * (income - 7000)); } if (income 28400 && income <= 68800) { return 3910.00 + (.25 * (income - 28400)); } if (income 68800 && income <= 143500) { return 14010.00 + (.28 * (income - 68800)); } if (income 143500 && income <= 311950) { return 34926.00 + (.33 * (income - 143500)); } if (income 311950) { return 90514.50 + (.35 * (income - 311950)); } return 0; } thanks guys for all your help, Rama |
Excel UDF Description, Help Keyword, Help File
I seems to remember something by "keepItCool" involving UDF and using
Excel's hidden NameSpace. Not sure how applicable from a C# point of view http://www.jkp-ads.com/articles/RegisterUDF01.htm NickHK "thinkrama" ... I've the following Excel UDF function (C#) which works if invoked from Excel. Would like to display function description and association help. Tried different attributes but wasn't succesful. /// <summary /// Calculate Income Tax. /// </summary /// <param name="income"income for which tax is to be ascertained</param /// <returnstaxable amount</returns /// public double Tax(double income, [Optional] string incomeFromOtherSources) [System.EnterpriseServices.Description("Calculate Income Tax"), HelpKeyword("Help Keyword Attribute")] public double Tax(double income) { if (income 0 && income <= 7000) { return (.10 * income); } if (income 7000 && income <= 28400) { return 700.00 + (.15 * (income - 7000)); } if (income 28400 && income <= 68800) { return 3910.00 + (.25 * (income - 28400)); } if (income 68800 && income <= 143500) { return 14010.00 + (.28 * (income - 68800)); } if (income 143500 && income <= 311950) { return 34926.00 + (.33 * (income - 143500)); } if (income 311950) { return 90514.50 + (.35 * (income - 311950)); } return 0; } thanks guys for all your help, Rama |
All times are GMT +1. The time now is 01:36 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com