This example defines a custom worksheet function named Discountand adds it to the collection of worksheet functions in the SpreadsheetControl. The SpreadsheetControl loads a document with formulas which reference the Discount function defined in the external Excel XLL Add-in. After loading the document, function names in formulas are corrected to remove the "_xll.DiscountXLL.MyFunctions." name prefix, leaving only the function name Discount. Finally the worksheet formulas are calculated using the custom Discount function defined in this example.
↧