public void AutoOpen() { ExcelIntegration.RegisterUnhandledExceptionHandler(ex => "!!! ERROR: " + ex.ToString()); // Set the Parameter Conversions before they are applied by the ProcessParameterConversions call below. // CONSIDER: We might change the registration to be an object...? var conversionConfig = GetParameterConversionConfig(); var postAsyncReturnConfig = GetPostAsyncReturnConversionConfig(); var functionHandlerConfig = GetFunctionExecutionHandlerConfig(); // Get all the ExcelFunction functions, process and register // Since the .dna file has ExplicitExports="true", these explicit registrations are the only ones - there is no default processing ExcelRegistration.GetExcelFunctions() .ProcessMapArrayFunctions(conversionConfig) .ProcessParameterConversions(conversionConfig) .ProcessAsyncRegistrations(nativeAsyncIfAvailable: false) .ProcessParameterConversions(postAsyncReturnConfig) .ProcessParamsRegistrations() .ProcessFunctionExecutionHandlers(functionHandlerConfig) .RegisterFunctions(); // First example if Instance -> Static conversion InstanceMemberRegistration.TestInstanceRegistration(); }
public void AutoOpen() { try { Application.ThreadException += ApplicationThreadUnhandledException; AppDomain.CurrentDomain.UnhandledException += AppDomainUnhandledException; TaskScheduler.UnobservedTaskException += TaskSchedulerUnobservedTaskException; ExcelIntegration.RegisterUnhandledExceptionHandler(ExcelUnhandledException); _log = Log.Logger = ConfigureLogging(); _log.Information("Starting sample Excel-DNA Add-In with Serilog Sink LogDisplay"); ExcelComAddInHelper.LoadComAddIn(this); _log.Verbose("Registering functions"); ExcelRegistration.GetExcelFunctions() .Select(UpdateFunctionAttributes) .RegisterFunctions(); _log.Information("Sample Excel-DNA Add-In with Serilog Sink LogDisplay started"); } catch (Exception ex) { ProcessUnhandledException(ex); } }
private void SetupExcel() { ExcelIntegration.RegisterUnhandledExceptionHandler( delegate(object ex) { return(string.Format("Error: {0}", ex.ToString())); } ); }
public void AutoOpen() { ExcelIntegration.RegisterUnhandledExceptionHandler(e => "ERROR: " + (e as Exception).Message); //var excel = (Microsoft.Office.Interop.Excel.Application)ExcelDnaUtil.Application; //var xllPath = (string)XlCall.Excel(XlCall.xlGetName); //excel.AddIns.Add(xllPath, false /* don't copy file */).Installed = true; }
public void AutoOpen() { ExcelIntegration.RegisterUnhandledExceptionHandler(globalErrorHandler); AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; ExcelDna.ComInterop.ComServer.DllRegisterServer(); ExcelApp.AttachApplicationEvents(); this.InjectWvvwDelegate(); }
public void AutoOpen() { var listener = new LogDisplayTraceListener(); Trace.Listeners.Add(listener); ExcelIntegration.RegisterUnhandledExceptionHandler( ex => "Unhandled EXCEPTION: " + ex.ToString()); IntelliSenseServer.Install(); }
public void AutoOpen() { new AutoXllRegister().RegisterXll(); ExcelAsyncUtil.Initialize(); ExcelIntegration.RegisterUnhandledExceptionHandler(ex => $"EXCEPTION: {ex.ToString()}"); CtpManager.Initialize(); }
public void AutoOpen() { ExcelIntegration.RegisterUnhandledExceptionHandler(ErrorHandler); // Register Ctrl+Shift+H to show log window XlCall.Excel(XlCall.xlcOnKey, "^H", "ShowLogWindow"); // Register Ctrl+Shift+A to show introspection window XlCall.Excel(XlCall.xlcOnKey, "^A", "ShowIntrospectionWindow"); }
public void AutoOpen() { ExcelIntegration.RegisterUnhandledExceptionHandler(ErrorHandler); try { com_addin = new MyCom(); ExcelComAddInHelper.LoadComAddIn(com_addin); } catch (Exception e) { MessageBox.Show("Error loading COM AddIn: " + e.ToString()); } }
/// <summary>Initialize the <see cref="IExcelAddIn"/>. /// </summary> public void AutoOpen() { try { IntelliSenseServer.Install(); ExcelIntegration.RegisterUnhandledExceptionHandler(UnhandledExceptionHandler); // add a 'standard-output' if a try-catch block is missing } catch (Exception e) { MessageBox.Show(String.Format("{0} Stack trace: {1}", e.Message, e.StackTrace), "Dodoni.net (XL-BasicComponents): Fatal error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// This function is called when the XLL is installed into an Excel spreadsheet /// </summary> public void AutoOpen() { try { ExcelIntegration.RegisterUnhandledExceptionHandler( ex => "!!! EXCEPTION: " + ex.ToString()); } catch (Exception ex) { log.Fatal(ex.ToString()); } }
public void AutoOpen() { ExcelIntegration.RegisterUnhandledExceptionHandler(ex => "!!! EXCEPTION: " + ex.ToString()); ComServer.DllRegisterServer(); try { _comAddin = new qXLComAddIn(); ExcelComAddInHelper.LoadComAddIn(_comAddin); } catch (Exception ex) { MessageBox.Show(@"Error loading COM AddIn: " + ex); } }
public void Initialize() { IntelliSenseServer.Register(); ExcelIntegration.RegisterUnhandledExceptionHandler(ex => { var message = (ex as Exception)?.Message; if (ex is AggregateException) { message = ((AggregateException)ex).GetBaseException().Message; } return($"#ERROR: {message}"); }); }
public void AutoOpen() { RegisterFunctions(); // setup error handler ExcelIntegration.RegisterUnhandledExceptionHandler(ex => ex.ToString()); var app = ExcelDnaUtil.Application as Microsoft.Office.Interop.Excel.Application; app.RTD.ThrottleInterval = 100; //Open the client connection ConnectionMonitor = new ConnectionMonitor(); ConnectionMonitor.RegisterClient(Client); ExcelComAddInHelper.LoadComAddIn(new ComAddIn(Client, ConnectionMonitor)); //Start the monitor ConnectionMonitor.FindAvailableServicesAsync().ContinueWith(result => { ConnectionMonitor.Start(); }); }
public virtual void AutoOpen() { ExcelIntegration.RegisterUnhandledExceptionHandler(OnError); // Set the Parameter Conversions before they are applied by the ProcessParameterConversions call below. // CONSIDER: We might change the registration to be an object...? var conversionConfig = GetParameterConversionConfig(); // Get all the ExcelFunction functions, process and register // Since the .dna file has ExplicitExports="true", these explicit registrations are the only ones - there is no default processing ExcelRegistration.GetExcelFunctions() .ProcessParameterConversions(conversionConfig) .ProcessParamsRegistrations() .RegisterFunctions(); var registration = new Registration(Container); foreach (var methodInfo in Methods) { registration.AddMethod(methodInfo); } foreach (var propertyInfo in Properties) { registration.AddProperty(propertyInfo); } var bindingService = Container.GetInstance <IBindingService>(); var application = (Application)ExcelDnaUtil.Application; application.SheetChange += bindingService.OnSheetChange; registration.GetAllRegistrations() .ProcessParameterConversions(conversionConfig) .ProcessParamsRegistrations() .ProcessAsyncRegistrations() .RegisterFunctions(); }
public void AutoOpen() { // setup support for RTD functions ExcelAsyncUtil.Initialize(); // setup error handler ExcelIntegration.RegisterUnhandledExceptionHandler(ex => "!!! EXCEPTION: " + ex.ToString()); // setup connection to server var a = new EndpointAddress("net.tcp://localhost:8080/hello"); var b = new NetTcpBinding(); var f = new DuplexChannelFactory <IRTDServer>(this, b, a); _server = f.CreateChannel(); _server.Register(); // this makes the server get a callback channel to us so it can call SendValue // increase RTD refresh rate since the 2 seconds default is too slow (move as setting to ribbon later) object app; object rtd; app = ExcelDnaUtil.Application; rtd = app.GetType().InvokeMember("RTD", BindingFlags.GetProperty, null, app, null); rtd.GetType().InvokeMember("ThrottleInterval", BindingFlags.SetProperty, null, rtd, new object[] { 100 }); }
public void AutoOpen() { Init(); ExcelIntegration.RegisterUnhandledExceptionHandler( ex => "!!! EXCEPTION: " + ex.ToString()); }
public void AutoOpen() { ExcelAsyncUtil.Initialize(); ExcelIntegration.RegisterUnhandledExceptionHandler(ex => "!!! EXCEPTION: " + ex.ToString()); }
public void AutoOpen() { ExcelIntegration.RegisterUnhandledExceptionHandler(ex => $"[Error] {((Exception)ex).Message}"); }
public void AutoOpen( ) { Logr.Log("AutoOpen"); ExcelIntegration.RegisterUnhandledExceptionHandler(e => "EXCEPTION: " + (e as Exception).Message); }
private void SetupExceptions() { ExcelIntegration.RegisterUnhandledExceptionHandler(HandleException); }
public override void RegisterUnhandledExceptionHandler(UnhandledExceptionHandler exceptionHandler) { ExcelIntegration.RegisterUnhandledExceptionHandler(exceptionHandler); }
public void AutoOpen() { ExcelIntegration.RegisterUnhandledExceptionHandler(globalErrorHandler); }
public void AutoOpen() { lScriptEngine = new V8ScriptEngine(V8ScriptEngineFlags.EnableDebugging); // WindowsScriptEngineFlags.EnableDebugging); RegisterFunctions(); ExcelIntegration.RegisterUnhandledExceptionHandler(ex => "!!! EXCEPTION: " + ex.ToString()); }
public void AutoOpen() { ExcelIntegration.RegisterUnhandledExceptionHandler(ex => ex.ToString()); }