File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Diagnostics ;
4+ using System . Linq ;
5+ using System . Text ;
6+ using System . Threading ;
7+ using System . Threading . Tasks ;
8+ using ExcelDna . Integration ;
9+ using static ExcelDna . Integration . XlCall ;
10+
11+ namespace MasterSlave
12+ {
13+ public static class SlaveDriver
14+ {
15+ // Passing this as a parameter makes it hard to call from the ribbon...
16+ const string path = @"C:\Work\Excel-DNA\Samples\MasterSlave\Slave\bin\Debug\Slave-AddIn.xll" ;
17+ public static void RegisterSlave ( )
18+ {
19+ Console . Beep ( ) ;
20+ Console . Beep ( ) ;
21+ Console . Beep ( ) ;
22+ Console . Beep ( ) ;
23+ Excel ( xlcMessage , true , $ "Loading { path } ") ;
24+ Thread . Sleep ( 1000 ) ;
25+ ExcelIntegration . RegisterXLL ( path ) ;
26+ }
27+
28+ public static void UnregisterSlave ( )
29+ {
30+ ExcelIntegration . UnregisterXLL ( path ) ;
31+ }
32+ }
33+ }
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <packages >
3+ <package id =" ExcelDna.AddIn" version =" 0.33.9" targetFramework =" net45" />
4+ <package id =" ExcelDna.Integration" version =" 0.33.9" targetFramework =" net45" />
5+ </packages >
You can’t perform that action at this time.
0 commit comments