|
I have the following sample code snippet which after registering using ComRegisterFunctionAttribute is correctly available in Excel as User Defined Function (UDF).
/// <summary> /// Calculate Income Tax. /// </summary> /// <param name="income">income for which tax is to be ascertained</param> /// <returns>taxable 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; }
How can I display the function Description in Excel? Function Help document and Description are what I need. Please help me out.
Thanks, Rama
Rama Katta [MCSD.Net] |