using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Office.Interop;
using Excel = Microsoft.Office.Interop.Excel;
using System.IO;
using System.Runtime.InteropServices;
namespace excel_starter
{
class Program
{
static void Main(string[] args)
{
try
{
var app = new Excel.Application();
app.Visible = true;
Excel.Workbooks wbks = app.Workbooks;
wbks.Open(Directory.GetCurrentDirectory() + "\\addin1.xlam");
Excel.Workbook wbk = wbks.Open(Directory.GetCurrentDirectory() + "\\example.xlsx");
Marshal.ReleaseComObject(wbk);
Marshal.ReleaseComObject(wbks);
Marshal.ReleaseComObject(app);
}
catch (Exception e) {
Console.WriteLine(e.Message);
}
}
}
}