File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -586,6 +586,29 @@ public static TestType1 NativeReturnTestType1(string s)
586586| A1 | =NativeVersion2("4.3.2.1") | The Native Version value with field count 2 is 4.3
587587| A2 | =NativeReturnTestType1("world") | The Native TestType1 return value is world
588588
589+ # Function execution handler
590+
591+ ``` csharp
592+ public class FunctionLoggingHandler : FunctionExecutionHandler
593+ {
594+ public override void OnSuccess (FunctionExecutionArgs args )
595+ {
596+ System .Diagnostics .Trace .WriteLine ($" OnSuccess - Result: {args .ReturnValue }" );
597+ }
598+
599+ [ExcelFunctionExecutionHandlerSelector ]
600+ public static IFunctionExecutionHandler LoggingHandlerSelector (IExcelFunctionInfo functionInfo )
601+ {
602+ return new FunctionLoggingHandler ();
603+ }
604+ }
605+ ```
606+
607+ | Cell | Formula | Result
608+ | --------- | ----------------------| ------
609+ | A1 | =NativeHello("world") | Hello world!
610+ | DebugView | | OnSuccess - Result: Hello world!
611+
589612# Not supported functionality in native add-ins
590613
591614Loading images for ribbon controls.
You can’t perform that action at this time.
0 commit comments