I have a Visual Studio solution that contains two projects (1) a C# console application; and (2) a C# Excel Workbook.
The console application creates some data, which I would then like to pass into the workbook.
To do this I have created a method in the Excel workbook project, which receives data from the console application. However, I cannot create an instance of the Excel book. At the moment I am trying:
Excel.Application excelApplication = new Excel.Application(); Excel.Workbook excelWorkBook = excelApplication.Workbooks.Add("MyBook.xls");
I could hard code the path to the xls file, but I don't really want to do this as I would prefer to wrap everything up into a single .exe
Any ideas?